Relationship between FPGA Sample Frequency, FPGA Clock Frequency, Simulink Solver Rate and Oversampling Factor
Hi, I have a generator controller model in Simulink, I’m hoping to have it deployed on Speedgoat (IO334-325k) and use it to run a real generator. I have five analog input channels and one TTL discrete output channel.
My first question is, am i correct in understanding that the FPGA sample frequency is how fast the FPGA internal signals are sampled? (for example, if i have a discrete transfer function in my model, is it seeing the ‘FPGA sample frequency’ as the sample rate? This is important because discrete transfer functions only work properly at the correct sample rate).
Second question, I read from here (Troubleshooting Real-Time Hardware Deployment Issues in Simscape Hardware-in-the-Loop Workflow – MATLAB & Simulink – MathWorks France) that FPGA sample frequency = FPGA clock frequency/(Oversampling factor x Number of solver iterations), also from here (hdl coder oversampling factor – Google Search) that Oversampling factor = FPGA clock frequency/ Simulink solver rate. Does it mean if the number of solver iterations is 1, then FPGA sample frequency equals the simulink solver rate? I also don’t understand why the simulink solver rate is part of the equation provided that my model only has analog and discrete IOs from/to the outside world, or does it mean in my case, the Oversampling factor = FPGA clock frequency/ ADC rate?
I would really appreciate it if you could help me with the questions above, Thank you very much in advance.
YeungHi, I have a generator controller model in Simulink, I’m hoping to have it deployed on Speedgoat (IO334-325k) and use it to run a real generator. I have five analog input channels and one TTL discrete output channel.
My first question is, am i correct in understanding that the FPGA sample frequency is how fast the FPGA internal signals are sampled? (for example, if i have a discrete transfer function in my model, is it seeing the ‘FPGA sample frequency’ as the sample rate? This is important because discrete transfer functions only work properly at the correct sample rate).
Second question, I read from here (Troubleshooting Real-Time Hardware Deployment Issues in Simscape Hardware-in-the-Loop Workflow – MATLAB & Simulink – MathWorks France) that FPGA sample frequency = FPGA clock frequency/(Oversampling factor x Number of solver iterations), also from here (hdl coder oversampling factor – Google Search) that Oversampling factor = FPGA clock frequency/ Simulink solver rate. Does it mean if the number of solver iterations is 1, then FPGA sample frequency equals the simulink solver rate? I also don’t understand why the simulink solver rate is part of the equation provided that my model only has analog and discrete IOs from/to the outside world, or does it mean in my case, the Oversampling factor = FPGA clock frequency/ ADC rate?
I would really appreciate it if you could help me with the questions above, Thank you very much in advance.
Yeung Hi, I have a generator controller model in Simulink, I’m hoping to have it deployed on Speedgoat (IO334-325k) and use it to run a real generator. I have five analog input channels and one TTL discrete output channel.
My first question is, am i correct in understanding that the FPGA sample frequency is how fast the FPGA internal signals are sampled? (for example, if i have a discrete transfer function in my model, is it seeing the ‘FPGA sample frequency’ as the sample rate? This is important because discrete transfer functions only work properly at the correct sample rate).
Second question, I read from here (Troubleshooting Real-Time Hardware Deployment Issues in Simscape Hardware-in-the-Loop Workflow – MATLAB & Simulink – MathWorks France) that FPGA sample frequency = FPGA clock frequency/(Oversampling factor x Number of solver iterations), also from here (hdl coder oversampling factor – Google Search) that Oversampling factor = FPGA clock frequency/ Simulink solver rate. Does it mean if the number of solver iterations is 1, then FPGA sample frequency equals the simulink solver rate? I also don’t understand why the simulink solver rate is part of the equation provided that my model only has analog and discrete IOs from/to the outside world, or does it mean in my case, the Oversampling factor = FPGA clock frequency/ ADC rate?
I would really appreciate it if you could help me with the questions above, Thank you very much in advance.
Yeung hdl coder, fpga, speedgoat, oversampling, fpga sample frequency MATLAB Answers — New Questions