An H-bridge circuit is an electronic power circuit that is used to control electric motors, such as DC motors for automotive applications. The H-bridge is used to control the speed and direction of motors by allowing the right amount of current to flow in the right direction of the motor. The H-bridge consists of four MOSFETs that are controlled by Pulse Width Modulation (PWM) control signals.
The initial design of this DC Motor control uses Multisim-LabVIEW co-simulation, which allows the complete system performance to be validated on the desktop. The motor is modeled in Multisim, including parameters such as the armature resistance, inductance, and the load weight to accurately verify the performance results. The controller is designed using the LabVIEW Control Design & Simulation and LabVIEW FPGA modules. Using Multisim-LabVIEW co-simulation avoids having to compile digital logic for an FPGA; you will no longer have to simulate analog and digital systems separately which results in design problems. At the implementation stage of the design, the analog circuitry can be quickly transferred to Ultiboard for rapid prototyping as will be further explained. This seamless transition between Multisim and Ultiboard ensures accurate transfers of simulated designs. The graphical control code is transferred to a Single-Board RIO 9605 FPGA target. Single-Board RIO 9605 is an embedded control and acquisition device, which integrates a real-time processor, a user-reconfigurable FPGA, and I/O on a single printed circuit board (PCB).
2. System Overview
The closed-loop control of the motor starts off by user-defined inputs in the LabVIEW host application for the system simulation, such as the required speed and step size. This information is sent back to the Multisim design using the co-simulation terminals. Time-step negotiations between Multisim and LabVIEW occur to guarantee simulation accuracy and conversion on both sides. If there are sudden peaks or drops in Multisim, time-step negotiation will allow Multisim to change the provided time-step in LabVIEW in order to view peaks and drops. Switching of the H-bridge MOSFETs is controlled by the information sent from the LabVIEW host application. The analog circuit outputs encoded speed and current signals to the LabVIEW code to the feedback loop based on which switching decisions are made. The point-by-point simulation between analog circuits and digital systems of Multisim and LabVIEW results in improved system behavior and accuracy.
Once the system design has been verified with LabVIEW and Multisim co-simulation, the completed analog circuit can be easily transferred to Ultiboard for layout and routing. In Multisim, the analog circuit is connected to a pre-defined connector symbol for the 240-pin RIO Mezzanine Connector (RMC). The predefined connector symbol also has a footprint associated with it in Ultiboard. With these predefined connector symbols and footprints, you are able to customize your design with NI hardware and test platforms. The same LabVIEW graphical code used in simulation can be directly ported to the Single-Board RIO. The integration between the three platforms results in reduced prototype iterations to save you time and money.
3. Circuit Design in Multisim with LabVIEW Co-Simulation
The initial step of this design is to verify the H-bridge MOSFET analog circuit using Multisim-LabVIEW co-simulation. The initial parameters are set in LabVIEW, which are then sent to Multisim to simulate the circuit accordingly. The MOSFETs are turned ON and OFF by conditioned control signals sent from LabVIEW. The state of the MOSFETs determines the direction and speed of the controller. The MOSFETs used in the design are modeled from International Rectifier; IRF3710ZPBF. NI’s relationships with leading manufacturers, such as International Rectifier, allow us to include standard manufacturer models in Multisim's database. Having access to these components will allow you to simulate a circuit that will accurately predict how the component will work in the real-world. Without these models available, you may encounter inconsistencies between simulation models and physical parts.
The transient time simulation is performed in Multisim to predict the current through the motor and its rotation of speed. The feedback speed signals of the motor are passed through an encoder, sending the signals back to LabVIEW. In LabVIEW the signals are decoded and passed to the Proportional Integral (PI) Controller, developed as a graphical FPGA IP. The new switching information is encoded and sent back to Multisim. This single-cycle simulation loop runs for a specific duration, for example 2 seconds of simulation time, at a 40 MHz frequency.
The simulation results are shown below
4. Rapid Prototyping with NI Ultiboard
Seamless transition between Multisim and Ultiboard allows you to transfer your analog circuitry to a PCB layout to rapidly prototype it. This design uses the Single-Board RIO RMC connector symbol and footprint in the schematic capture step of the design process; when the circuit is transferred to Ultiboard, the footprint for the connector already exists along with many standard components used in this design. Manual routing options are used to create thick traces carrying up to 15A across the MOSFETs and the motor terminals. The Single-Board RIO connector maps to pin connectors that have been defined in Multisim. Advanced automatic routing options allocate routing components to the connector digital input and output pins on the Single-Board RIO. Since Multisim and Ultiboard are integrated, the Multisim file annotates its specific I/O interfacing design elements to the Ultiboard layout. Ultiboard’s fan-out option initializes traces from within the high pin-count SMT component (Single-Board RIO connector footprint) thus simplifying the routing procedure. Without the fan-out option, it would not be possible to route from the pins inside the connector footprint. The PCB includes an LCD screen, in which the user can view the current speed and direction of the motor controller and push buttons allowing the user to change the required speed of the motor.
Having predefined connector symbols and footprints allows you to save time. When creating connector symbols and footprints, the smallest inaccuracy in pin spacing definition, or sizing can result in errors and prototype iterations.
5. Complete System Solution
Being able to simulate analog and digital circuits simultaneously allows for an improved and accurate system development in shorter time. The point-by-point simulation provides Multisim with the required information from LabVIEW to alter the speed and direction of the motor accordingly. Once the speed transient response, current peaks, and control signals of the motor control are evaluated in the simulation stage, the analog circuitry can quickly be transferred to Ultiboard for prototyping, while the graphical code is transferred to Single-Board RIO. Predefined Single-Board RIO connector symbol and footprint allows you to save days of development and reduce prototype iterations instantly. This implementation of an H-bridge bushed DC motor control, is an ideal example of how you can improve your design with accurate system simulation and design using the NI tools; Multisim , LabVIEW, and Single-Board RIO.
There are various resources available on ni.com, which provides you the tools to architect custom designs such as the H-Bridge brushed DC motor control. To learn more, click on the links below.