How can i generate a triangular wave form using HDL supported blocks
15 views (last 30 days)
Show older comments
WAJDI ELSHARIF
on 30 Oct 2023
Edited: Kiran Kintali
on 30 Oct 2023
I need to generate a triangular wave form using HDL supported blocks . I will use this triangular wave form as a carrier to generate a PWM signal in real time using an FPGA. I am using Speedgoat target machine for rea time simulation.
0 Comments
Accepted Answer
Kiran Kintali
on 30 Oct 2023
Edited: Kiran Kintali
on 30 Oct 2023
See the attached sample model (with updown carrier type) you can generate triangular wave.
Some examples you may also find useful.
Deploy Simscape DC Motor Model to Speedgoat FPGA IO Module
This example shows how to generate an FPGA bitstream for a nonlinear Simscape™ model, such as a DC motor, and deploy it onto a Speedgoat® FPGA I/O module.
You generate VHDL® or Verilog® code for the blocks that are inside the green FPGA subsystem that contains the PWM generator and buck converter.
You can have a look at the Grid Tied Converter Example in the HDL Coder documentation. In this example there is a subsystem for PWM generation which is based on an integer counter:
Deploy Simscape Grid Tied Converter Model to Speedgoat IO Module Using HDL Workflow Script
openExample('hdlcoder/DeploySimscapeGridTiedConverterModelToSpeedgoatIOModuleExample')
This example shows how to deploy a three-phase two-level voltage source converter connected to a low voltage grid modeled in Simscape™ to a Speedgoat IO334 Simulink®-programmable I/O module to achieve a simulation time step of 1 microsecond (us).
Speedgoat ships an advanced PWM generator in the Motion Control HDL I/O Blockset. In this case, the PWM generator is a blackbox subsystem. A second masked subsystem block is provided for easy configuration of the PWM generator:
0 Comments
More Answers (0)
See Also
Categories
Find more on Simscape Hardware-in-the-Loop Workflow in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!