Trouble in upconverting a narrow band signal to a 1 GHz carrier using Simulink

4 views (last 30 days)
Analog Aroma
Analog Aroma on 29 Apr 2011
Hi All,
I have tried to a model a RF upconversion mixer where a base band signal will be multiplied with a 1 GHz signal. The
following sampling times were used.
---------- For BB signal , samplin time : 1/ 4MHz , ie , 0.25 us. For carrier : sampling time : 1/ 10GHz
---------------
The model files are uploaded to the following link.
After running the model , I have got the following problem.
-------------------------
llegal rate transition found. Sample time [1e-10 0] of 'Random__data_up_conversion_buggy/Mix 1' at input port 1 is different from sample time [2.5e-07 0] of its source 'Random__data_up_conversion_buggy/PSSS_BB aus FPGA-Design/From Workspace' at output port 1. A Rate Transition must be inserted between them.
-------------------------
How to do this rate transition ? Any idea ?
WR,
Analog Aroma

Answers (1)

Jarrod Rivituso
Jarrod Rivituso on 29 Apr 2011
Short answer - do one of the following
  • Insert a Rate Transition (Simulink -> Signal Attributes) block anytime you have a signal which is updated at one rate being fed into another block that is updating at a different rate.
  • Set the solver to SingleTasking. Go to Simulink -> Configuration Parameters -> Solver and then set the Tasking Mode for periodic sample times to Singletasking.
Some background...
Simulink has this idea of the world where if you are using a Fixed-step solver, it thinks you might end up generating code from the model so it can run in real-time on some processor. It wants to be nice to you and help you ensure that the simulation results you get match up with the results you see in the real-time execution of the code.
In real-time execution, different rates might have different priorities, and high priority rates might be able to preempt low priority rates. Simulink calls this "multitasking". As soon as you allow this, you allow potential data integrity issues. Often, the workaround to these issues involve buffering or delaying data.
The Rate Transition block aims to help you add protections against those issues. If you use a solver set to multitasking, it forces you to add the effects of those protections in simulation, so you can see the effects prior to ever generating code.
So, your options, as stated above
  • Add the protections (using the Rate Transition block)
  • Tell Simulink that you aren't interested in potential multitasking execution considerations, and set the solver to Singletasking
Hope this helps!

Communities

More Answers in the  Power Electronics Control

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!