Generate the following signals in Simulink
Ältere Kommentare anzeigen
Good evening Matlab community. I am a bit new to simulink. I would like to know how to plot the function x(t)= 5*cos(30*pi*t+0.25*pi) using blocks. My attempt is below: but the output is all wrong. How do I plot this function? Am I supposed to use a constant source? the contents of my function block is in the other pic. I want a clear xy plot in the scope. Or do I use the xy plot block? I would appreciate any guidance thank you!


19 Kommentare
Purushottama Rao
am 31 Jan. 2017
Are u intended to use sine wave as the input for the function?? I feel that you are looking for a some kind of sine func defined by y. In that case 'u' should be time and a linearly increasing. Use a clock instead of a sine wave as the input to the function.
Aaron Connell
am 31 Jan. 2017
Aaron Connell
am 31 Jan. 2017
Aaron Connell
am 31 Jan. 2017
Purushottama Rao
am 31 Jan. 2017
Bearbeitet: Purushottama Rao
am 31 Jan. 2017
you can go for more sampling time by discretizing the model. Use a power gui block to do so.
Aaron Connell
am 31 Jan. 2017
Purushottama Rao
am 31 Jan. 2017
Include a powergui block in your model from library. In the powergui parameters, change the model to dicrete model and enter the sampling time such as 5e-5 or so.
Aaron Connell
am 31 Jan. 2017
Purushottama Rao
am 31 Jan. 2017
can u attach ur model??
Aaron Connell
am 31 Jan. 2017
Aaron Connell
am 31 Jan. 2017
Aaron Connell
am 31 Jan. 2017
Bearbeitet: Aaron Connell
am 31 Jan. 2017
Purushottama Rao
am 31 Jan. 2017
Bearbeitet: Purushottama Rao
am 31 Jan. 2017
I was trying to replicate your model here. One trick for your problem is to use a gain block with unit gain in front of the function and Set the sampling time to the value entered in powergui.

Aaron Connell
am 31 Jan. 2017
Aaron Connell
am 31 Jan. 2017
Purushottama Rao
am 31 Jan. 2017
Bearbeitet: Purushottama Rao
am 31 Jan. 2017
set the sampling time in the gin block parmeter.

Aaron Connell
am 31 Jan. 2017
Purushottama Rao
am 31 Jan. 2017
Bearbeitet: Purushottama Rao
am 31 Jan. 2017
You can also use a zero order hold block in the same way. Dont forget to change the sampling time.

Aaron Connell
am 31 Jan. 2017
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Signal Generation finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
