How to apply a frequency-domain transfer function to a time-domain signal in a Simulink MATLAB Function block?
39 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I’m struggling a bit with how to correctly implement a frequency-domain transfer function inside Simulink.I have a MATLAB script that computes a transfer function H(f) over a range of frequencies for a micro-ring resonator model. What I want in Simulink is:
- Input: a time-domain sine wave (carrier) + some control voltages
- Apply the frequency-domain transfer function to this sine wave
- Output: the filtered time-domain signal
I have attached an image showing the relevant parts of this model

Where I’m stuck
- In Simulink, the carrier signal is a scalar at each time step. Doing an fft on a single scalar sample doesn’t make sense – I’d need a full frame of samples to apply the transfer function in the frequency domain.
- If I try to implement the script logic directly, the MATLAB Function block ends up outputting a vector (c_out) while the Scope and the rest of my model expect a scalar at each time step. Simulink complains about dimensions / frame handling.
- I will also be adding some blocks after c_out to extract the pilot signal because it will then be used further for some different processes in my ultimate goal of this simulation, so I’m not sure what the correct structure is supposed to be.
What would the approach to solving this be? I am working on recreating a model from a reference paper, but I have unfortunately not been able to acquire the original model developed by the author of the reference
3 Commenti
Mathieu NOE
il 1 Dic 2025 alle 17:52
hello
From the TF data / model , why not create (identify) a FIR or IIR digital filter, with invfreqs or invfreqz, then use it (with the appropriate discrete filter simulink block)
Risposte (0)
Vedere anche
Categorie
Scopri di più su Get Started with DSP System Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!