27
Work-cum- Study Done on OPAL-RT RTOS: A Platform for Running HIL Simulations developed in SIMULINK Abhishek Syal BHEL Corp. R&D

Opal-RT Work_Abhishek Syal

Embed Size (px)

Citation preview

Work-cum- Study Done on OPAL-RT

RTOS: A Platform for Running HIL

Simulations developed in SIMULINKSimulations developed in SIMULINK

Abhishek Syal

BHEL Corp. R&D

Introduction

– Focus: Real-time power plant & electrical network simulation.

• Needed to test controllers for an unstable network

Testing: Building a Simple Model

====

==

2

2

2

distance time, mass,force,

where,

Fd

xtmF

xdtd

mmaF

∫ ∫ ++=

=

21

2

2

)(gives to respect withsides both gintegratin

cdtcdtmF

x

t mF

xdtd

velocity

distance

acceleration

Signal

Generator

Product

Integrator

10

Constant

mass

force

distancevelocityacceleration

s

1

Integrator

s

1

Control System Block Diagram

Simulation Results

RT-LAB Naming Convention

SC_ : console subsystem, (at most one)

SM_ : master subsystem, (always one)

SS_ : slave subsystem(s), (any number)

� Distributed processing features

• 3 targets: SM and 2 SS subsystems

Example II – A Plant

Plant: The physical system being controlled.

Controller: A device that receives data from the

sensors and, based on the results of a

control algorithm calculation, sendscontrol algorithm calculation, sends

control signals to actuators so as to

induce desired behavior in the plant.

Human interface: Provides for human interaction with

the system

Hierarchical Decomposition

OpComm Communication Blocks

receives real-time-synchronized signals from

other computation subsystems

receives signals asynchronously from the

console subsystem

OpComm blocks in the SM subsystem

OpComm blocks in the SS subsystem

OpComms blocks in the SC subsystem

RT Lab I/Os

Model in Progress…

Digital I/Os – Time Stamped

Some Difficulties Encountered &

ResolvedProblem 1: Error while building/compiling the model.

• Problem description: The model was not able to successfully compile with RT-Lab. Problem read- the RT-Lab was not running on target.

• Solution implemented: The same version of RT-Lab running on the host should be running on the target as well. If not.. such error will pop up. The way to install the RT-Lab on the target is…

• Right click on the target under the target list >> goto install >> In that RT-Lab. • Right click on the target under the target list >> goto install >> In that RT-Lab.

Problem 2: Error while loading.

• Problem implemented : The model was getting compiled successfully. But while loading there was a problem. This was crashing the loading process.

• Solution offered: The steps to be followed while compilation was not done in a sequential manner. Hence, when the model was carried through the steps, the model was loaded successfully.

Some Difficulties Encountered &

ResolvedProblem 3: RT-Lab crashes .

• Problem description: RT-Lab crashed and some files of RT-Lab were deleted and RT-Lab was not able to open again

• Solution implemented : The RT-Lab was crashed because of the antivirus-Kaspersky. The antivirus deleted some of the files, and denied access for RT-Lab. Hence the antivirus was disabled and the RT-Lab was re-installed. And further on… it has been working perfectly since then.

Problem 4: Could not get the target into development mode.

• Problem description: RT-Lab was not able to start the compilation process.

• Solution implemented : After the step of edition. The next step is to set the model development platform. By default. The target platform will be set to QNX 6.0 . we need to change the platform to REDHAT, as the target platform is REDHAT and not REDHAT (64 Bit) as the system is a 32 bit version. There is no option to change the default setting to REDHAT from QNX 6.0 because SET is one of the steps to be followed for the successful compilation and execution of RT-Lab model.

Some Difficulties Encountered &

Resolved (Interesting Ones…)Problem 5: RT Lab not supporting XHP mode for controller operation.

• Problem description: RT-Lab was not able to complete the compilation process as XHP mode was not supported which was necessary for the controller code.

• Solution implemented : License error found. License was checked with demo license. A new license was delivered to BHEL Corp. R&D which had the feature of spooling, and supporting XHP Corp. R&D which had the feature of spooling, and supporting XHP mode. License error was rectified.

Problem 6: RT Lab not supporting I/O modules.

• Problem description: RT-Lab was not able to communicate with i/o cards

• Solution implemented : The interfacing card was loosely placed inside the covering. It as removed and corrected in both the Wanda Simulators & Opal RT RTOS.

Thank You