Urgent... simulink doubt. Op amp model by transfer funstion-distorted output?
Show older comments
Before moving into a model of the real world op amp, I'm trying to model a basic op amp - first order - low pass filter transfer function, typical op amp open loop gain = 10^5 ; cut off frequency = 10^5 Hz, Therefore the tf is: 10^5 / (1 + s/(2*pi*10^5))
Unity negative feedback provided; (beta = 1) so that the closed loop transer function has a dc gain of approximately 1. Configuration parameters - variable step max step size - 1e-3(also tried 1e-4) min step - auto relative tolerance - 1e-3 absolute tolerance - auto refine factor - 1 simulation time - 0 - 0.005 sec (5 cycles for input is 1000 hz sine)
Doubt 1: The scope is giving only output for time - 0.0049 to 0.005 sec, also the ouput is distorted. ???
When i replaced the transfer function with "gain block(10^5) + analog filter block(butterworth low pass with pass band edge = 2*pi*10^5)":
Doubt 2: The scope is giving only output for time - 0.0049 to 0.005 sec, the ouput is not distorted. ???
A solution please...
1 Comment
Walter Roberson
on 7 Jun 2012
http://www.mathworks.com/matlabcentral/answers/29922-why-your-question-is-not-urgent-or-an-emergency
Answers (3)
Walter Roberson
on 7 Jun 2012
0 votes
By default, scopes only display the last 5000 points. You can alter their parameters to display everything.
Avinash Bhat
on 8 Jun 2012
0 votes
Erosoft
on 8 Jun 2012
0 votes
Hi,
I've also some doubt using variable-step simulation with simulink.
In my model output copy input one of the 2 inputs A or B according to a 3rd input C with a variable scheduling.
The input signals have a length of 160 for a total time of 11s. When I retrieve the outpout signal its length is 11002 points for a total time of 11s. I can easily understand when I run a simulation with variable step matlab calculate more points to avoid missing changing state, but when I plot the 3 signals on the same figure, there's nothing good, the output signal doesn't match with one of the 2 signals A or B.
But I have notice that when I plot the 3 signals first 160 points on the same figure they match together. Furthermore when I compare the ouput signals [1:160] to the [161:11002] one it seems like if the second parts was an image of the first part expanded according to the time.
I seriously think that there's a bug to fix with Matlab, unless I have to correct a parameter option but I doubt I have seen nothing in the help.
I do not know, if my answer will help you to resolve your problem, but excuse me for translating my french to english.
David
1 Comment
Kaustubha Govind
on 11 Jun 2012
David: It's hard to comment on your model without looking. I would recommend reporting this to MathWorks Tech Support with your model if you are confident that it is a bug.
Categories
Find more on Multirate and Multistage Filters in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!