Why is “lsim” different than Simulink’s “Linear Analysis Tool”
I have a simple transfer function. I want to analyze its time response to a random input signal. When I use the “lsim” command (or ltiviewer), I can run a simulation. However, when I implement my transfer function in Simulink, and run the same simulation (random input) using the Linear Analysis tool, I get completely different results. Is there a fundamental difference between the two tools? It seems like Simulink and lsim/ltiview are treating my transfer function differently…
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Yes, several suggestions/questions.
First of all, your workflow does not quite make sense. Frequency Response Estimation capability in the Linear Analysis tool is designed for computing frequency response of nonlinear Simulink models that cannot be linearized using exact linearization due to discontinuities such as PWM or triggered subsystems. It does not make sense to use it in your case — you can if you want to, but it is meaningless.
Let me explain why. What you have is a linear system — a transfer function. There is no need to linearize Simulink model that consists only of a transfer function — you already have this transfer function to start with! Also, there is no need to use frequency response estimation. What it does is that it injects a signal into the model, logs the output, and computes the FFT of system response from the input and output signals. Again, as you already have your transfer function, there is no need to use frequency response estimation.
In your case, it seems you are trying to simulate a transfer function output to a random signal. You already know how to do it in MATLAB. To do it in Simulink, you just run the simulation, you do not need to linearize the model or use frequency response estimation. Just double check that your Random number block generates the same signal as input signal you designed in MATLAB, replace the outport block with “To workspace” block, and run the simulation.
SEE COMPLETE ANSWER CLICK THE LINK