{"id":24098446,"url":"https://github.com/matlab-deep-learning/csinet-channel-compression-in-matlab-using-keras","last_synced_at":"2026-04-02T02:44:44.109Z","repository":{"id":118343818,"uuid":"600101610","full_name":"matlab-deep-learning/CSINet-Channel-Compression-in-MATLAB-Using-Keras","owner":"matlab-deep-learning","description":"This example shows how to co-execute MATLAB and Python to simulate the effect of channel estimate compression on precoding in a MIMO OFDM channel.","archived":false,"fork":false,"pushed_at":"2024-09-17T12:16:29.000Z","size":1097,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-14T21:51:23.670Z","etag":null,"topics":["communications","csinet","deep-learning","keras","matlab","matlab-deep-learning","tensorflow"],"latest_commit_sha":null,"homepage":"https://www.mathworks.com/products/communications.html","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matlab-deep-learning.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-10T15:33:20.000Z","updated_at":"2025-02-25T13:37:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"3a715b30-bdc3-4886-96ce-da0d8d49f8ea","html_url":"https://github.com/matlab-deep-learning/CSINet-Channel-Compression-in-MATLAB-Using-Keras","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matlab-deep-learning%2FCSINet-Channel-Compression-in-MATLAB-Using-Keras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matlab-deep-learning%2FCSINet-Channel-Compression-in-MATLAB-Using-Keras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matlab-deep-learning%2FCSINet-Channel-Compression-in-MATLAB-Using-Keras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matlab-deep-learning%2FCSINet-Channel-Compression-in-MATLAB-Using-Keras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matlab-deep-learning","download_url":"https://codeload.github.com/matlab-deep-learning/CSINet-Channel-Compression-in-MATLAB-Using-Keras/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252942269,"owners_count":21829033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["communications","csinet","deep-learning","keras","matlab","matlab-deep-learning","tensorflow"],"created_at":"2025-01-10T14:45:54.291Z","updated_at":"2026-04-02T02:44:44.064Z","avatar_url":"https://github.com/matlab-deep-learning.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simulate Channel Compression Effect on Precoding Using MATLAB and Keras with CSINet\n\nThis example shows how to co-execute MATLAB\u0026reg; and Python\u0026reg; to simulate the effect of channel estimate compression on precoding in a MIMO OFDM channel. It shows how to:\n* Generate CDL channel estimates in MATLAB using the [5G Toolbox\u0026trade;](https://www.mathworks.com/products/5g.html)\n* Load and test a pre-trained CSINet Keras\u0026trade; model using co-execution with Python\n* Fine tune the model weights through transfer learning using co-execution with Python\n* Simulate the effect of channel estimate compression on precoding in MATLAB using the [5G Toolbox](https://www.mathworks.com/products/5g.html) and [Communications Toolbox\u0026trade;](https://www.mathworks.com/products/communications.html)\n\nThe following figure summarizes the operations executed in MATLAB (marked in blue) versus those executed in Keras (marked in grey).\n\n![](images/Workflow_Coexecution.png)\n\n## Overview\n\nThere are different options for accessing deep learning models within MATLAB, including:\n\n1. Using models created in MATLAB using [Deep Learning Toolbox\u0026trade;](https://www.mathworks.com/products/deep-learning.html)\n2. [Converting](https://www.mathworks.com/help/deeplearning/import-deep-neural-networks.html) models from other frameworks into MATLAB\n3. Co-executing models from other frameworks with MATLAB\n\nThis example provides an overview of the third approach. Co-execution is useful for leveraging [wireless products in MATLAB](https://www.mathworks.com/solutions/wireless-communications.html) to test existing deep learning models from other frameworks in an end-to-end link simulation. \nThis workflow also allows engineering teams working with MATLAB \u0026 Python deep learning frameworks to easily combine their work in one environment.\nApproaches one \u0026 two are useful for building deep learning models from scratch or for using additional capabilities from the [Deep Learning Toolbox](https://www.mathworks.com/products/deep-learning.html) with pre-trained models, such as [Deep Learning Code Generation](https://www.mathworks.com/help/deeplearning/code-generation.html) or [deep learning models in Simulink\u0026reg;](https://www.mathworks.com/help/deeplearning/ug/classify-images-in-simulink-with-imported-tensorflow-network.html). \n\n### Requirements\nTo run this example, you need:\n- [MATLAB](http://www.mathworks.com) R2022b or later\n- [Communications Toolbox](https://www.mathworks.com/products/communications.html)\n- [5G Toolbox](https://www.mathworks.com/products/5g.html)\n- [Python](https://www.python.org/downloads/release/python-3104/) (tested with version 3.10.4)\n- [TensorFlow\u0026trade;](https://www.tensorflow.org/) (tested with version 2.10.0)\n- [Keras](https://keras.io/) (tested with version 2.10.0)\n- [Numpy\u0026trade;](https://numpy.org/) (tested with version 1.23.4)\n\nFor more information about installing Python, see [Install Supported Python Implementation](https://www.mathworks.com/help/matlab/matlab_external/install-supported-python-implementation.html).\n\n## Running the Example\nOpen and run the live script `SimChanCompEffOnPrecodingUsingMATLABAndKerasWithCSINetExample.mlx`. \nTo generate a new CDL channel estimates dataset, use the live script `GenerateCSINetDataSet.mlx`. \nThe live scripts use the helper files `preprocessChannelEstimate.m` and `postprocessChannelEstimate.m` for pre/post-processing the training and testing data sets.\n\n### Visualize the channel compression effect\nBy the end of the example, you will be able to visualize the effect of channel feedback compression with CSINet [1] on the received constellation of an OFDM MIMO channel with zero-forcing precoding.\nThe following figure shows the effect of using CSINet for channel feedback with compression rate 1/4 and normalized mean square error -42 dB in a CDL channel with the following parameters:\n* Tx Antennas: 32\n* Rx Antennas: 2\n* Delay Profile: CDL-B\n* RMS delay spread: 100 ns\n* Max delay after truncation: 32\n* Max Doppler: 2 Hz\n* Resource blocks: 48 \n* Subcarrier spacing: 30 KHz\n\n\u003cimg src=\"images/ConstellationDiagram.png\" width=50% height=50%\u003e\n\n## References\n[1] Wen, Chao-Kai, Wan-Ting Shih, and Shi Jin, \"Deep learning for massive MIMO CSI feedback,\" IEEE Wireless Communications Letters, vol. 7, no. 5, pp. 748-751, Oct. 2018.\n\nCopyright 2023, The MathWorks, Inc.\n\n[![View CSINet-Channel-Compression-in-MATLAB-Using-Keras on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/124575-csinet-channel-compression-in-matlab-using-keras)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatlab-deep-learning%2Fcsinet-channel-compression-in-matlab-using-keras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatlab-deep-learning%2Fcsinet-channel-compression-in-matlab-using-keras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatlab-deep-learning%2Fcsinet-channel-compression-in-matlab-using-keras/lists"}