Adjusting sample rate in Simulink model to reflect transition from bitrate to symbol rate
I am trying to build a simple communication system in Simulink. I want to simulate a bit source that generates bits with a specific sample rate (bit rate). I then buffer the generate samples into frames of 1008 bits. For application specific reasons I then pad the frame with 16 zeros to a total of 1024 bits. The goal is then to BPSK modulate the bits and output the generated symbols at a specific symbol rate different to the bit rate.
The goal is that the spectrum analyzer shows a spectrum that reflects the intended symbol rate.
I have problems implementing this and I am confused about how Simulink handles frame time/sample time. Sample time in Simulink is defined as the rate at which a block generates output. So far so good, but I still want to enforce a specfic real sample time, i.e., time between consecutive samples (NOT frames).
Problem 1
Using the Vector Concatenate block for zero padding effectively seems to upsample the signal and the sample time in the resulting frame is smaller than the bitrate/sample rate specified in the bit source. I am using a Frame Transition block to remedy this where I specify the sample time (this is ambigous this specifies the frame time due to the Simulink sample time definition) property as (Frame_Size+16)*bit_rate. This does not seem to work as the output frames of the Rate Transition block is somewhat unpredictable. However, when placing a spectrum analyzer directly after the first Rate Transition block, the sample rate that is displayed in the spectrum analyzer shows the intended sample rate = bit_rate (10 kHz).
Problem 2
After the BPSK block I placed another Rate Transition Block to generate symbol frames where each symbol is output at a specific symbol rate. In my case the symbol rate is bit_rate/10. The spectrum analyzer shows the desired sample rate (1kHz). (see image below)
BUT: again, the output frames of the second Rate Transition block do not show the desired behaviour. I want it to buffer the incoming frames and output them at a slower rate. What happens though, is that the Rate Transition block subsamples the input and outputs every 10th frame and drops the other frames.
Any help is greatly appreciated! Thanks!I am trying to build a simple communication system in Simulink. I want to simulate a bit source that generates bits with a specific sample rate (bit rate). I then buffer the generate samples into frames of 1008 bits. For application specific reasons I then pad the frame with 16 zeros to a total of 1024 bits. The goal is then to BPSK modulate the bits and output the generated symbols at a specific symbol rate different to the bit rate.
The goal is that the spectrum analyzer shows a spectrum that reflects the intended symbol rate.
I have problems implementing this and I am confused about how Simulink handles frame time/sample time. Sample time in Simulink is defined as the rate at which a block generates output. So far so good, but I still want to enforce a specfic real sample time, i.e., time between consecutive samples (NOT frames).
Problem 1
Using the Vector Concatenate block for zero padding effectively seems to upsample the signal and the sample time in the resulting frame is smaller than the bitrate/sample rate specified in the bit source. I am using a Frame Transition block to remedy this where I specify the sample time (this is ambigous this specifies the frame time due to the Simulink sample time definition) property as (Frame_Size+16)*bit_rate. This does not seem to work as the output frames of the Rate Transition block is somewhat unpredictable. However, when placing a spectrum analyzer directly after the first Rate Transition block, the sample rate that is displayed in the spectrum analyzer shows the intended sample rate = bit_rate (10 kHz).
Problem 2
After the BPSK block I placed another Rate Transition Block to generate symbol frames where each symbol is output at a specific symbol rate. In my case the symbol rate is bit_rate/10. The spectrum analyzer shows the desired sample rate (1kHz). (see image below)
BUT: again, the output frames of the second Rate Transition block do not show the desired behaviour. I want it to buffer the incoming frames and output them at a slower rate. What happens though, is that the Rate Transition block subsamples the input and outputs every 10th frame and drops the other frames.
Any help is greatly appreciated! Thanks! I am trying to build a simple communication system in Simulink. I want to simulate a bit source that generates bits with a specific sample rate (bit rate). I then buffer the generate samples into frames of 1008 bits. For application specific reasons I then pad the frame with 16 zeros to a total of 1024 bits. The goal is then to BPSK modulate the bits and output the generated symbols at a specific symbol rate different to the bit rate.
The goal is that the spectrum analyzer shows a spectrum that reflects the intended symbol rate.
I have problems implementing this and I am confused about how Simulink handles frame time/sample time. Sample time in Simulink is defined as the rate at which a block generates output. So far so good, but I still want to enforce a specfic real sample time, i.e., time between consecutive samples (NOT frames).
Problem 1
Using the Vector Concatenate block for zero padding effectively seems to upsample the signal and the sample time in the resulting frame is smaller than the bitrate/sample rate specified in the bit source. I am using a Frame Transition block to remedy this where I specify the sample time (this is ambigous this specifies the frame time due to the Simulink sample time definition) property as (Frame_Size+16)*bit_rate. This does not seem to work as the output frames of the Rate Transition block is somewhat unpredictable. However, when placing a spectrum analyzer directly after the first Rate Transition block, the sample rate that is displayed in the spectrum analyzer shows the intended sample rate = bit_rate (10 kHz).
Problem 2
After the BPSK block I placed another Rate Transition Block to generate symbol frames where each symbol is output at a specific symbol rate. In my case the symbol rate is bit_rate/10. The spectrum analyzer shows the desired sample rate (1kHz). (see image below)
BUT: again, the output frames of the second Rate Transition block do not show the desired behaviour. I want it to buffer the incoming frames and output them at a slower rate. What happens though, is that the Rate Transition block subsamples the input and outputs every 10th frame and drops the other frames.
Any help is greatly appreciated! Thanks! simulink, sample time, rate transition, symbol rate, bit rate MATLAB Answers — New Questions