Trouble simulating an RC low and high pass filter with trapoziodal aproximation
3 comentarios
Hi Dayan,
Thanks for clarification. Based on your current setup, potential adjustments might involve refining the equations governing `v2` and `v3` updates within the simulation loop. Here's a hypothetical adjustment focusing on refining the update equation for `v3`:
for k = 1:length(vs)
va1 = vs(k);
v1(k) = va1;
va2 = (gr1*va1 + gc1*va3 - ic1eq) / (gr1 + gc1);
v2(k) = va2;
va3 = (gc1*va2 + ic1eq + ic2eq) / (gc2 + gc1 + gr2);
% Ensure this equation reflects the intended filter behavior
v3(k) = va3;
ic1eq = ic1eq + (1/m) * (gc1 * (va3 - va2) - ic1eq);
ic2eq = ic2eq + (1/m) * (gc2 * va3 - ic2eq);
end
Make sure that your simulation accurately reflects the desired filtering behavior by reviewing the integration method, component values, and simulation loop structure. By systematically verifying and adjusting these aspects, you can align the simulated output `v3` with the expected characteristics of a high/low-pass filter as per your requirements. Please let me know if you have any further questions.
Respuestas (1)
Ver también
Categorías
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!