Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Pickering Programmable Resistor and Precision Resistor Modules DIL Driver

This driver implements the most common features of Pickering Programmable Resistor and Precision Resistor Modules. The driver aims to support all Pickering cards so a generic point of view will be presented in the document.

Description of Pickering Programmable Resistor and Precision Resistor Modules

Pickering Programmable Resistor Module is a module used to program a specific value of resistance. This module is useful when the simulation pilots the resistance value. It allows performing automatic tests. The module is a PXI card presented below:

Programmable Resistor Module

PXI Chassis

The driver also supports Pickering Programmable Precision Resistor Modules that are able to set more precisely a resistance value.

The modules have to be slotted in a PXI chassis. The PXI chassis is connected on a PCI-Express slot of the simulator. The modules are a subset of resistors (channels). Each channel is composed by a chain of resistances, each of these resistances has a switch to short or enable it. The module bit resolution defines the number of switches in each channel. The module's architecture for 8-bit resolution is given below:

Each channel (resistor) is equivalent to the typical subunit of a Pickering card.

Glossary

This glossary explains some terms proper to Pickering cards and to the Opal-RT Data Interchange Layer.

Data Interchange Layer is the framework developed by Opal-RT to exchange data between different entities. It is usually referred to as DIL. The entity here indicates any program that receives and sends data. So it refers to a driver or a model. In DIL context, a driver is usually designated by an exchanger and a model by a process. To exchange data between different entities, DIL establishes a connection between dataPoints. A dataPoint refers to a memory space where the entity put or retrieve the data. A dataPoint refers to the inputs or outputs of different entities. The connection between two dataPoints shapes the exchanges between two entities. In the present scope, the data interchange between the Pickering driver and a Simulink Model is presented.

Supported Cards

Most Pickering FIU cards behave in a similar manner and therefore should be compatible with this driver without any modification and re-compilation. We must, however, maintain a list of properties of each supported card to interact correctly with them. To this end, we use a ".opal" file which describes the properties of each supported card.

Currently, the below three cards have been tested with the driver, if one intends to use another Pickering card, its specifications must be added to this file. The file is located in: [installation directory]\OPAL-RT\RT-LAB\[RT-LAB version]\common\bin\x32\Data\Drivers\Pickering\supported_cards.opal.

OPAL-1.0 Object
Pickering::Configuration {
	resistiveCardList {
		item {
			serialNumber=ANY
			type=resistive
			typeNumber=40-295-121
			numberOfSubUnits=10
			bitsPerChannel=16;
		}	
		item {
			serialNumber=ANY
			type=resistive
			typeNumber=40-295-121
			numberOfSubUnits=6
			bitsPerChannel=24;
		}
		item {
			serialNumber=ANY
			type=resistive
			typeNumber=40-297-020
			numberOfSubUnits=9
			bitsPerChannel=0
			precisionSetting=true;
		}
	}
}


Configuration File

In the configuration .opal file, the configuration of the Pickering Driver allows the user to specify all Pickering Cards in his setup. This file lists all the resistive module available and their configuration. A simple example of configuration .opal file is given below:

OPAL-1.0 Object
Pickering::Configuration {
	useRTCoreForFIU=0
	useRTCoreForResistance=0
	resistiveCardList {
		item {
			serialNumber=341362
			type=resistive
			typeNumber=40-295-121
			numberOfSubUnits=10
			bitsPerChannel=12
			minUpdateRateUs=500
			subUnitsList {
				item {
					index=1
					defaultValue=100
					gain=1.0
					offset=0.0
					maxBits=12					
				}
				item {
					index=2
					defaultValue=200
					gain=1.0
					offset=0.0
					maxBits=12					
				}				
				item {
					index=3
					defaultValue=300
					gain=1.0
					offset=0.0
					maxBits=12					
				}				
				item {
					index=4
					defaultValue=400
					gain=1.0
					offset=0.0
					maxBits=12					
				}
				item {
					index=5
					defaultValue=500
					gain=1.0
					offset=0.0
					maxBits=12					
				}
				item {
					index=6
					defaultValue=600
					gain=1.0
					offset=0.0
					maxBits=12					
				}		
				item {
					index=7
					defaultValue=700
					gain=1.0
					offset=0.0
					maxBits=12					
				}		
				item {
					index=8
					defaultValue=800
					gain=1.0
					offset=0.0
					maxBits=12					
				}	
				item {
					index=9
					defaultValue=900
					gain=1.0
					offset=0.0
					maxBits=12					
				}	
				item {
					index=10
					defaultValue=1000
					gain=1.0
					offset=0.0
					maxBits=12					
				}					
			}
		}
		item {
			serialNumber=341472
			type=resistive
			typeNumber=40-295-121
			numberOfSubUnits=6
			bitsPerChannel=24
			minUpdateRateUs=500
			subUnitsList {
				item {
					index=1
					defaultValue=100
					gain=1.0
					offset=0.0
					maxBits=24				
				}
				item {
					index=2
					defaultValue=200
					gain=1.0
					offset=0.0
					maxBits=24				
				}				
				item {
					index=3
					defaultValue=400
					gain=1.0
					offset=0.0
					maxBits=24				
				}				
				item {
					index=4
					defaultValue=2000
					gain=1.0
					offset=0.0
					maxBits=24				
				}
				item {
					index=5
					defaultValue=3000
					gain=1.0
					offset=0.0
					maxBits=24				
				}
				item {
					index=6
					defaultValue=4000
					gain=1.0
					offset=0.0
					maxBits=24				
				}				
			}			
		}
	}
}

To use a precision resistive module, a new item has to be added to the resistiveCardList as follow:

item {
	serialNumber=361718
	type=resistive
	typeNumber=40-297-020
	numberOfSubUnits=9
	precisionSetting=true
	minUpdateRateUs=500
	subUnitsList {
		item {
			index=1
			defaultValue=10
			gain=1.0
			offset=0.0
			maxBits=0					
		}
		item {
			index=2
			defaultValue=20
			gain=1.0
			offset=0.0
			maxBits=0					
		}				
		item {
			index=3
			defaultValue=30
			gain=1.0
			offset=0.0
			maxBits=0					
		}				
		item {
			index=4
			defaultValue=40
			gain=1.0
			offset=0.0
			maxBits=0					
		}
		item {
			index=5
			defaultValue=50
			gain=1.0
			offset=0.0
			maxBits=0					
		}
		item {
			index=6
			defaultValue=60
			gain=1.0
			offset=0.0
			maxBits=0					
		}		
		item {
			index=7
			defaultValue=70
			gain=1.0
			offset=0.0
			maxBits=0					
		}		
		item {
			index=8
			defaultValue=80
			gain=1.0
			offset=0.0
			maxBits=0					
		}	
		item {
			index=9
			defaultValue=90
			gain=1.0
			offset=0.0
			maxBits=0					
		}					
	}
}
 

General Parameters

The drivers have the following general parameters:

useRTCoreForFIUIf the system has an unused CPU core, this parameter can be set to '1' to move the FIU threads to a reserved core for deterministic computation.
useRTCoreForResistanceIf the system has an unused CPU core, this parameter can be set to '1' to move the resistive threads to a reserved core for deterministic computation.

Identification of a Programmable Resistive Module

The cards are identified the following parameters:

serialNumberThis parameter is the serial number of the programmable resistive module. This unique number given by Pickering is used to identify the card. The user could retrieve this number on the front panel of the module.
typeThis parameter is a string that specifies the type of Pickering module. It must be 'resistive' for programmable resistive modules and 'fiu' for Fault Insertion Unit cards.
typeNumberThis parameter is a number that specifies the type of Pickering module.
numberOfSubUnitsThis parameter specifies the number of subunits for Pickering Module. For programmable resistive cards, the number of subunits is the number of channels, and a channel corresponds to a resistor. This value is specified in the documentation of each Pickering card.
bitsPerChannelThis parameter is used to specify the number of switches used to set a resistor for a programmable resistive module. In a generic point of view, it is equivalent to the number of columns.
minUpdateRateUs:An asynchronous thread is responsible of applying the resistance value on each card. If there is no change in the resistive values of a configured card, its associated thread has nothing to do. In this case, protection has been added to avoid the threads from taking over the core 0. This value is the minimum delay, in microseconds, applied to the thread loop in the case there is no resistance value to update on the card in the current thread loop.
precisionSettingThis parameter only has to appear and to be set to true when using the 40-297-20 precision card. This card is the only precision card supported for now.

All the parameters presented are used to identify the type of Pickering module. With these parameters, it is possible to define most of Pickering cards.
It is important to mention that if the model is also using Pickering Fault Insertion Unit cards, they must be defined in the same file into a 'fiuCardList', just under the 'resistiveCardList'. Please refer for the Fault Insertion Unit driver documentation in that case.

Channel Description

A list of subunits (channels) is provided for each card. In this list, each channel is described with the following parameters:

indexThis parameter is the index of a channel.
defaultValueThis parameter is a default state applied to the specific channel during the first pause and when the simulation resets. It should be in the range supported by the programmable resistive module.
gainThis parameter is a gain which is applied to the model value.
offsetThis parameter is an offset used to compensate the default offset of resistive.
maxBitsThis parameter is the maximum number of switches used to represent the resistor.


Through the parameter used to describe the channel, the non-precision resistor value obeys the following algorithm:

temp = value_specified_by_user * gain + offset
if(temp > 2^maxBits - 1 ){
	resistor_value = 2^maxBits - 1
}
else{
	resistor_value = temp;
}

Warnings

Please note that the DIL parser is currently quite sensitive and does not accept blank lines or comments. Also, it might seem like it is not that easy to correctly write the configuration .opal file since it consists mostly of digital values and not words, which would be more user-friendly. However, the configuration .opal file does not have to be written down manually, as highlighted in the following section.

Please note that the FIU cards are not already supported by the present driver.



Connections Files

The driver uses the previous configuration file to publish Data Points for the exchanger. The connections file match the Data Points published by the driver to the DataPoint of the exchanger to the DataPoint in the model. The connections file is designed by the model's designer. Below is an example of a connections.opal file:

OPAL-1.0 Object
List {
  item {
    configFile=pickering_40_295_121_cfg.opal
    id {
      Pickering
    }
    outputs {
      item {
        dataInExchanger=341362_channel_1[0]
        dataInProcess=OpOutput:card1_channel1[0]
      }
      item {
        dataInExchanger=341362_channel_2[0]
        dataInProcess=OpOutput:card1_channel2[0]
      }
      item {
        dataInExchanger=341362_channel_3[0]
        dataInProcess=OpOutput:card1_channel3[0]
      }
      item {
        dataInExchanger=341362_channel_4[0]
        dataInProcess=OpOutput:card1_channel4[0]
      }
      item {
        dataInExchanger=341362_channel_5[0]
        dataInProcess=OpOutput:card1_channel5[0]
      }
      item {
        dataInExchanger=341362_channel_6[0]
        dataInProcess=OpOutput:card1_channel6[0]
      }
      item {
        dataInExchanger=341362_channel_7[0]
        dataInProcess=OpOutput:card1_channel7[0]
      }
      item {
        dataInExchanger=341362_channel_8[0]
        dataInProcess=OpOutput:card1_channel8[0]
      }	  
      item {
        dataInExchanger=341362_channel_9[0]
        dataInProcess=OpOutput:card1_channel9[0]
      }
      item {
        dataInExchanger=341362_channel_10[0]
        dataInProcess=OpOutput:card1_channel10[0]
      }	 
      item {
        dataInExchanger=341472_channel_1[0]
        dataInProcess=OpOutput:card2_channel1[0]
      }	  
      item {
        dataInExchanger=341472_channel_2[0]
        dataInProcess=OpOutput:card2_channel2[0]
      }
      item {
        dataInExchanger=341472_channel_3[0]
        dataInProcess=OpOutput:card2_channel3[0]
      }
      item {
        dataInExchanger=341472_channel_4[0]
        dataInProcess=OpOutput:card2_channel4[0]
      }
      item {
        dataInExchanger=341472_channel_5[0]
        dataInProcess=OpOutput:card2_channel5[0]
      }
      item {
        dataInExchanger=341472_channel_6[0]
        dataInProcess=OpOutput:card2_channel6[0]
      }		  
    }
    inputs {
      item {
        dataInExchanger=341362_status_1[0]
        dataInProcess=OpInput:card1_status_channel1[0]
      }
      item {
        dataInExchanger=341362_status_2[0]
        dataInProcess=OpInput:card1_status_channel2[0]
      }
      item {
        dataInExchanger=341362_status_3[0]
        dataInProcess=OpInput:card1_status_channel3[0]
      }
      item {
        dataInExchanger=341362_status_4[0]
        dataInProcess=OpInput:card1_status_channel4[0]
      }
      item {
        dataInExchanger=341362_status_5[0]
        dataInProcess=OpInput:card1_status_channel5[0]
      }
      item {
        dataInExchanger=341362_status_6[0]
        dataInProcess=OpInput:card1_status_channel6[0]
      }
      item {
        dataInExchanger=341362_status_7[0]
        dataInProcess=OpInput:card1_status_channel7[0]
      }
      item {
        dataInExchanger=341362_status_8[0]
        dataInProcess=OpInput:card1_status_channel8[0]
      }	  
      item {
        dataInExchanger=341362_status_9[0]
        dataInProcess=OpInput:card1_status_channel9[0]
      }
      item {
        dataInExchanger=341362_status_10[0]
        dataInProcess=OpInput:card1_status_channel10[0]
      }	 
      item {
        dataInExchanger=341472_status_1[0]
        dataInProcess=OpInput:card2_status_channel1[0]
      }	  
      item {
        dataInExchanger=341472_status_2[0]
        dataInProcess=OpInput:card2_status_channel2[0]
      }
      item {
        dataInExchanger=341472_status_3[0]
        dataInProcess=OpInput:card2_status_channel3[0]
      }
      item {
        dataInExchanger=341472_status_4[0]
        dataInProcess=OpInput:card2_status_channel4[0]
      }
      item {
        dataInExchanger=341472_status_5[0]
        dataInProcess=OpInput:card2_status_channel5[0]
      }
      item {
        dataInExchanger=341472_status_6[0]
        dataInProcess=OpInput:card2_status_channel6[0]
      }		  
    }	
  }
}



Warning: Please note that the DIL parser is currently quite sensitive and does not accept blank lines or comments.



If the project where the driver has to be integrated already contains a 'connections.opal' file, the main item {} information of the file must be simply copied and added to the existing 'connections.opal' file. Also, the driver is the same for Pickering Fault Insertion Unit cards. If the model contains both drivers (Pickering programmable resistor driver and Pickering Fault Insertion Unit driver), the connections must be added under the same main item {}. Please refer for the Fault Insertion Unit driver documentation in that case.

The connections.opal file presented above lists the connections between the model and the exchanger (Pickering driver).

Two (02) sections are available in the file: the outputs and the inputs.

  • The first section is related to the outputs of the model. The outputs of the model are named with OpOutput blocks label. The naming is up to the user. In the example, the user chooses to name the card with serial number 341362 as card 1 and so all the channels of this card are preceded by the label card_1. The dataPoints of the exchanger are named with the serial number of programmable resistive module followed by '_channel' and followed by the channel index. It is important to respect this format. It has to be made of the serial number of the cardThis naming is fixed. So according to the data flow, the outputs of the model should be connected to the inputs of the exchanger (driver). The inputs that Pickering driver expecting from the model are the resistor value. DataPoint published by Pickering driver as input are the value of resistor declared in the configuration file as the channel. The user should refer to the configuration file to get the available channels. The connections mentioned in the outputs section refer to the resistor values directly.
  • The second section is related to the inputs of the model. In this section, the connections concern the inputs of the model and the outputs of the Pickering driver. The inputs of the model are named with OpInput blocks label. The naming is up to the user. The outputs of Pickering Driver are the status related to each resistor value. The status informs the user if the writing process is correctly performed. When the status is 0, the data is sent correctly to the module. When the status is -1, the data is not sent to the module. This occurs when the timestep of simulation is less than the settling time of the relay. The protection mechanism in Pickering is triggered to respect the settling time of the relay. The status will be set to -2 for all the channels if the card is not supported by the driver or not detected.

The Simulink Model

For the above example of pickering_40_295_121_cfg.opal and connections.opal, the Simulink model master subsystem would look like the following:



Warning: Please note that the default values of input connections should be determined in the mask of each OpInput block. This can be done simply by inserting the value of ones(1,n), where "n" matches the size of that connection (as indicated in the connections.opal file).




OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323