Wrong output with MATLAB S Function
Ältere Kommentare anzeigen
When I implement simple SOGI block to generate quadrature signal for given sinusoidla input, output magnitude comming exactly half. SOGI will give two outputs one is alpha and another is beta component. Beta component magnitude and phase is correct but alpha component magnitude is comming exactly half. Same discrete equations when I implemented in matlab function or tf block in simulink its giving correct. Same equations and everything same but when I implemented in s function its giving wrong.
Correct output with MATLAB Function: (Valpha and vin both having same phase and maginitude)

Wrong output with S Function (C code): (Valpha and vin both having same phase and maginitude)

I attached the simulation files of s function, This error is only because of s function related issues. Please check and let me know.
Thanks in advance.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Simulink Coder finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!