MATLAB: Simulink: High Freq. noise in sim. results

high frequency oscillations in simulink's results

I am simulating a very simple control loop with a P-controller and a stable 1-pole plant (with a pole at -1.5*10^5) that is shown in the image.
I am expecting no oscillations in the output (because the plant is stable and the controller is a P-controller); however, I see high frequency oscillations in the output. What are they due to? How to avoid them?

Best Answer

hi.i draw your model in simulink and also modeled the system in matlab itself. the STEP()command in matlab obviously shows that the system is stable and has a soft first order response. but in simulink !! there are several solvers to solve the differential equations in sim model.in simulink menu click configuration parameters... change the solver type to be a stiff solver....and also change the values of tolerances to somewhat like 1e-5 .(already they are initiated to be auto) this solves the problem.