
Cycle by Cycle Average of switching signal in SIMULINK
8 ビュー (過去 30 日間)
古いコメントを表示
Hi MATLAB Community,
I have been trying to find cycle by cycle average of a switching signal in MATLAB. For example, these three switching signals when passed through a moving average block with average time of 1/switching frequency give their perfect average in other softwares as shown below. I want to do the same thing in SIMULINK.

I deally, I would want the average of yellow switching signal (SCOPE1 in the ATTACHED FILE). The moving average block in SIMULINK does not give the desired results. Thanks

0 件のコメント
採用された回答
Mathieu NOE
2024 年 1 月 26 日
hello
I would suggest that any well designed low pass filter after the PWM signal should give you the original waveform
here my little demo attached (i could not really use your file) , generated with (R2020b) Simulink Version 10.2
here you can see the LP filtered PWM signal correctly follows the analog input signal that enters the comparator

before starting the slx file , you need to run this (for configuration) :
Fs = 1e5;
dt = 1/Fs;
sig_freq = 2; % Hz
% PWM low pass filter
fc = 25;
[B,A]=butter(3,2*fc/Fs);
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!