Azzera filtri
Azzera filtri

How to extract 50Hz fundamental frequency components or DC components with less delay in Simulink?

50 visualizzazioni (ultimi 30 giorni)
I want to extract the 50Hz fundamental frequency component or DC component of the voltage at the shunt point in a double closed loop control of an inverter. As far as I know, a low pass filter or a notch filter can be used. But the lower the cutoff frequency, the greater the signal delay between input and output. Is there a good way to solve the delay problem?

Risposta accettata

Ayush
Ayush il 14 Ago 2024 alle 10:11
Hi Xin,
I understand that you want to extract a particular fundamental frequency component of voltage at the shunt point in a double closed loop control of an inverter.
Here are some of the filtering techniques which I use. Also, I have listed the tradeoffs for each of the filtering method.
  1. Synchronous Reference Frame (SRF) Transformation
The SRF transformation, also known as the “Park” transformation, can be used to transform the AC signal into the d-q reference frame. This method effectively isolates the fundamental frequency component (50Hz) and the DC component.
Here’s pseudo code for the same:
% Assuming v is the input voltage signal and fs is the sampling frequency
theta = 2 * pi * 50 * (0:length(v)-1) / fs; % 50Hz fundamental frequency
cosTheta = cos(theta);
sinTheta = sin(theta);
v_d = v .* cosTheta; % d-component
v_q = v .* sinTheta; % q-component
% Low-pass filter the d and q components to extract the DC part
[b, a] = butter(2, 2*50/fs); % Low-pass filter with cutoff at 50Hz
v_d_filtered = filter(b, a, v_d);
v_q_filtered = filter(b, a, v_q);
% Transform back to the original reference frame
v_50Hz = v_d_filtered .* cosTheta + v_q_filtered .* sinTheta;
2. Adaptive Notch Filter
An adaptive notch filter can be used to dynamically track and filter out the 50Hz component with minimal delay. MATLAB's “dsp.NotchPeakFilter system object can be used for this purpose.
Fs = 1000; % Sampling frequency
F0 = 50; % Frequency to be removed (50Hz)
BW = 2; % Bandwidth of the notch
% Create the notch filter
notchFilter = dsp.NotchPeakFilter('CenterFrequency', F0, 'Bandwidth', BW, 'SampleRate', Fs);
% Apply the filter
v_filtered = notchFilter(v);
3. Phase-Locked Loop (PLL)
A PLL can be used to lock onto the 50Hz component and extract it with minimal delay. The PLL dynamically adjusts to track the phase and frequency of the input signal.
% Create a PLL System object
pll = comm.PhaseFrequencyOffset('FrequencyOffset', 50, 'SampleRate', fs);
% Apply the PLL
v_pll = pll(v)
There’s also “Kalman” Filter. You can read about these filters more in the following documentations:
Hope it helps!

Più risposte (0)

Community

Più risposte nel  Power Electronics Control

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by