Obtaining voltage ripple in simulink

Is it possible to obtain a voltage waveform ripple in a simulink model, using simulink blocks? If yes, how?

2 Comments

What type of waveform are you looking for? "ripple" is just a generic term, isn't it?
no,you may use simscape for that

Sign in to comment.

Answers (5)

Mr Bodhisatya Chouli use FFT os simulink to do harmoonic analyisis. That is the tool used for ripple content analysis. You can find it in the Powergui Block of Simulink
Can you obtain voltage and current ripple for these two models. I need to prove that 4th order boost (one with an extra low pass filter) converter has less ripple as compared to 2nd order system/
Mathan
Mathan on 3 Nov 2025

% MATLAB Code: Ripple Content Calculation

clc; clear; close all;

% ----- Example Output Voltage Waveform ----- % Simulate a rectified (pulsating DC) signal t = 0:0.001:0.1; % Time (s) Vdc = 12; % Average DC voltage (Volts) Vr = 2 * sin(2*pi*100*t); % Ripple voltage (AC component, 100 Hz) Vout = Vdc + Vr; % Total output voltage

% ----- Calculate Ripple ----- Vdc_measured = mean(Vout); % DC component Vr_ac = Vout - Vdc_measured; % Remove DC part Vr_rms = rms(Vr_ac); % RMS value of AC component ripple_percent = (Vr_rms / Vdc_measured) * 100; % Ripple content %

% ----- Display Results ----- fprintf('Measured DC Voltage: %.3f V\n', Vdc_measured); fprintf('Ripple RMS (AC part): %.3f V\n', Vr_rms); fprintf('Ripple Content: %.2f %%\n', ripple_percent);

% ----- Plot ----- figure; plot(t, Vout, 'LineWidth', 1.5); xlabel('Time (s)'); ylabel('Output Voltage (V)'); title('Output Voltage with Ripple'); grid on;

Mathan
Mathan on 3 Nov 2025

Measured DC Voltage: 12.00 V Ripple RMS (AC part): 1.00 V Ripple Content: 8.33 %

Products

Asked:

on 8 Aug 2011

Answered:

on 3 Nov 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!