From simulation to plant floor control

From simulation to plant floor control
From simulation to plant floor control
MathWorks ( and their hardware partner Speedgoat GmbH took another big step onto the plant floor with a turnkey simulation solution. With xPC Target Turnkey, users can do virtual design and debugging of machines, production lines and processes and the results will be automatically implemented in real control systems.
Virtual Robot Arm Simulation
Robot Arm Testing HIL (Hardware In the Loop)
Brian McKay, Product Marketing and Brett Murphy, Technical Marketing Manager of The MathWorks recently gave me an overview of the solution. The objective of the xPC Target Turnkey offering is to deliver turnkey systems of hardware and software to save engineering, configuration, and project labor. Each real-time target machine is assembled based on the project specific requirements, I/O connectivity, and environmental requirements. Murphy commented, “Engineers today must anticipate real-world scenarios, test against a growing list of requirements, and quickly incorporate changes to reduce overall development time and costs. Key to this is the ability to work with an integrated real-time testing environment.” “xPC Target Turnkey allows engineers to focus on their design goals instead of hardware specifications and offers wide-ranging connectivity and performance in a turnkey solution that spans both hardware and software.”
The xPC Target Turnkey combines software and hardware for users to simulate machines. The Speedgoat machines are used for hardware in the loop simulation to verify and debug the control design. The Speedgoat xPC Target can then be used as the final controllers.
Hardware-in-the-loop (HIL) simulation has been used in the development and test of complex real-time embedded systems. By applying HIL, a hardware platform with I/O is used to simulate the machine or process with mathematical representations. A HIL simulation must include electrical emulation of sensors and actuators. These electrical emulations act as the interface between the plant simulation and the embedded system under test. The value of each electrically emulated sensor is controlled by the plant simulation and is read by the embedded system under test (feedback).  Likewise, the embedded system under test implements its control algorithms by outputting actuator control signals. Changes in the control signals result in changes to variable values in the plant simulation. For example, a HIL simulation platform for the development of automotive anti-lock braking systems may have mathematical representations for each of the following subsystems in the simulation: vehicle dynamics, such as suspension, wheels, tires, roll, pitch and yaw, dynamics of the brake system’s hydraulic components, and road characteristics.
Speedgoat Hardware
Speedgoat has a number of hardware target form factors for lab, rack mount, industrial, and mobile applications. MathWorks partner, Speedgoat GmbH (, is based in Switzerland and develops real-time target systems that are optimized to work with Simulink and xPC Target software from The MathWorks. Speedgoat was founded in September 2006 by former MathWorks employees. 
Speedgoat Rack Mount Controllers
Speedgoat Industrial Controller
Speedgoat provides a range of I/O modules including fixed-functionality, configurable FPGA-based I/O, protocol, and other algorithmic functionality. Configurable FPGA-based I/O modules are typically used to implement special I/O (PWM, Capture, Quadrature Decoding, etc.) and protocol functionality (SPI, SSI, I2C,etc.) and to implement control loop algorithms running at highest cycle-rates.
Fixed-functionality I/O modules
  • Analog - High-resolution, high-speed, simultaneous sampling, ...
  • Digital - Parallel, TTL, 12V, 24V, high-drive, opto-coupled, ...
  • Serial - Asynchronous (RS232/RS422/RS423/RS485), synchronous (SDLC, HDLC, ...), Protocols (SSI, CAN, J1939, Raw Ethernet, UDP, SPI, I2C, ARINC 429, MIL-STD-1553)
  • Shared Memory - For high speed data transfer between two target machines or third-party nodes
  • Audio/Speech
Configurable FPGA-based I/O modules
  • Pulse-train
  • PWM, capture, quadrature decoding, hall, ... for TTL, RS422, RS485, LVDS, LVCMOS, ...
  • Protocols SSI, SPI, I2C, ... for inter-system, -sensor/actuator, and -chip protocols
  • Analog I/O with lowest latency and/or special synchronization schemes
  • Algorithmic implementations
  • Highest cycle-rate algorithmic implementations in combination with above functionality for very fast inner control loops
Most Speedgoat I/O modules are in the MC form factor and can be used in all Speedgoat real-time target machines with the exception of the Classic real-time target machine supporting I/O modules in the PC/104 form factor.
Other Hardware Options
Systems may be implemented with other hardware based on your requirements by generating control program code with using MathWorks Simulink software (More Simulink Information).  Simulink generates C code or IEC 61131 structured text compatible with the IDE (Integrated Design Environments) software of 3S-Smart Software Solutions (CoDeSys 2.3, 3.3), B&R Automation Studio, Beckhoff TwinCAT, Rockwell Automation RSlogix 5000. Simulink also supports the PLCopen XML version 2.01 interchange standard.
The cost of doing modeling and simulation, while not insignificant, has been coming down dramatically. In addition, the tools have become much easier to use. The people that understand the application can apply the new tools without the need to have detailed computer programming knowledge. There are great benefits to exploring the use of these technologies including lower development cost, shorter learning curve on new projects, and shorter project time.
Thoughts & Observation
This is part of a growing trend to link modeling and simulation tools directly to implementation of real world controls. 
It is interesting that MathWorks has developed a strong partnership with a hardware company, Speedgoat. This is one way to make it easier for users to get a fast start.
This is a big step for MathWorks, if a user implements the xPC Target Turnkey platform for simulation then is it logical they stay with the same hardware from Speedgoat for the final controller.
The cost and time to build physical prototypes has limited creatively and new ideas. Modeling and simulation tools give engineers the platform to try new ideas and create better solutions by rapid prototyping at low cost in a virtual environment.

Did you enjoy this great article?

Check out our free e-newsletters to read more great articles..