Documentation Home Page ◇ Power Electronics Add-On for NI VeriStand Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.
Machine Sensors Example Configuration
- Pierre-Luc Renault (Unlicensed)
Expand each of the sections below to explore the parameters configured in the Machine Sensors example. The information on this page can also be used to validate project settings or to re-create the example in a new VeriStand project.
Example Directory | <Public Documents>\National Instruments\<NI VeriStand 20xx>\Examples\OPAL-RT\Power Electronics Add-On\Machine Sensors |
---|---|
Project Path | <Machine Sensors>\Project\<NI PXIe-XXXX>\Machine Sensors.nivsprj |
Opening the Example
To avoid modifying the original example, make a local copy of the Example Directory shown above.
Open VeriStand and Browse to the copied directory, then continue browsing to the Project Path and select the VeriStand Project (.nivsprj) file.
Click Configure... to open the System Definition file.
See the following sections on this page to explore the parameters configured in the Configuration Tree of the System Definition file.
Hardware Configuration
In the Configuration Tree, expand Controller >> Custom Devices and click the Power Electronics Add-On custom device to open its configuration page.
The Hardware Configuration selected in the Configuration dropdown depends on the FPGA card targeted by the project. Note that this example could be re-created using any Hardware Configuration that contains a Resolver, Encoder, or Hall Effect Sensor.
NI FPGA Card | Hardware Configuration |
---|
NI FPGA Card | Hardware Configuration |
---|---|
NI PXIe-7868R | |
NI PXIe-7891 |
Circuit Model
Because no Circuit Model is required for this example, it uses a placeholder circuit consisting of one Source, one Switch, and one Measurement.
In the Configuration Tree, expand Power Electronics Add-On and click Circuit Model.
The Circuit Model File Path points to the currently loaded Circuit Model. Open the file in Simulink to observe the circuit.
(optional) Click Reload to trigger a model update in the System Definition.
(optional) Click the Refresh button to see additional model information.
Circuit Model File Path: <Machine Sensors>\Circuit Model\PlaceholderCircuit.slx
Sources
The Sources page maps signals to each source of the circuit model. In this example, the Source mapping configuration does not affect the results of the simulation because the circuit is simply a placeholder.
In the Configuration Tree, expand Circuit Model and click Sources. This page is populated with a list of sources from the circuit model.
The mappings are configured as shown below; any Group and Element can be mapped to Source.
Switches
The Switches page maps signals to each switch of the circuit model. In this example, the switch mapping configuration does not affect the results of the simulation because the circuit is simply a placeholder.
In the configuration tree, expand Circuit Model and click Switches. This page is populated with a list of switches from the circuit model.
The mappings are configured as shown below; any Group and Element can be mapped to a switch.
Machine Models
In this example, we manually rotate the machine models so that their respective Resolver, Encoder, and Hall-Effect Sensors generate output signals. Because we are interested only in the mechanical rotation of the machine, we can leave the Input Mapping Configuration and the electrical Machine Configuration parameters unconfigured. Each machine model is set to Speed Controlled Mode to allow its speed to be commanded via the User-Defined Speed channel.
In the Configuration Tree, expand Circuit Model >> PMSM BLDC X >> Mechanical Model and click the Mechanical Model Mode channel.
For all machine models, the Default Value of the channel is set to 0 for Speed Controlled Mode.
Sensors
The PXIe-7868R version of this example uses both its available PMSM BLDC models, while the PXIe-7891 version uses three of its four models. The table below shows which PMSM BLDC model is used to simulate each type of sensor. Follow the steps in the Resolver, Quadrature Encoder, and Hall Effect Sensor sections below to understand how the sensor parameters are configured.
| PXIe-7868R | PXIe-7891 |
---|
| PXIe-7868R | PXIe-7891 |
---|---|---|
Resolver | PMSM BLDC 1 | PMSM BLDC 1 |
Quadrature Encoder | PMSM BLDC 1 | PMSM BLDC 2 |
Hall Effect Sensor | PMSM BLDC 2 | PMSM BLDC 3 |
Resolver
See the Resolver documentation for a full description of the model and its parameters.
In the Configuration Tree, expand PMSM BLDC X and click Resolver.
The Angle Conditioning and Gain Configuration parameters do not need to be modified because they are available as VeriStand channels and can be modified during the simulation.
In this example, the Internal Carrier parameters are configured as shown below.
(optional) Modify the Excitation Frequency and Initial Carrier Angle to observe their impacts on the Resolver output signals. They are not editable during the simulation.
Internal Carrier |
---|
Internal Carrier | |
---|---|
Initial Carrier Angle (deg) | 0 |
Excitation Frequency (Hz) | 10 |
Enable Internal Carrier | TRUE |
Force Initial Angle | FALSE |
Enable Resolver Parameters as Channels | TRUE |
Quadrature Encoder
See the Encoder documentation for a full description of the model and its parameters.
In the Configuration Tree, expand PMSM BLDC X and click Encoder.
Set the Encoder Mode to Quadrature Encoder to view the Encoder parameters.
In this example, the encoder Configuration parameters are configured as shown below.
(optional) Modify these parameter values to observe their effects on the Quadrature Encoder output signals. They are not editable during the simulation.
Configuration |
---|
Configuration | |
---|---|
Encoder Mode | Quadrature Encoder |
Number of Pole Pairs | 1 |
Angle Offset (deg) | 0 |
Number of Pulses/Revolution | 10 |
Rotation Type | A Leads B |
Polarity | Active High |
Hall Effect Sensor
The Hall Effect Sensor is a mode of the Encoder model. Note that it is not available for the IM SM machine model.
In the Configuration Tree, expand PMSM BLDC X and click Encoder.
Set the Encoder Mode to Hall Effect to view the Hall Effect Sensor parameters.
In this example, the Hall Effect Sensor Configuration parameters are configured as shown below.
(optional) Modify these parameter values to observe their effects on the Quadrature Encoder output signals. They are not editable during the simulation.
Configuration |
---|
Configuration | |
---|---|
Encoder Mode | Hall Effect |
Number of Pole Pairs | 1 |
Speed Sign | Clockwise |
Position A (deg) | 0 |
Position B (deg) | 120 |
Position C (deg) | -120 |
Waveform Channels
Waveform Channels allow signals to be streamed from the FPGA at a rate faster than that of the CPU execution.
In the Configuration Tree, expand Circuit Model and click Waveforms.
The signals in the example are mapped to the Waveform channels as shown below. The data from these channels will be streamed at the Sample Rate (S/s) specified at the bottom of the page.
OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter