• No se han encontrado resultados

Las bibliotecas que participan en las redes o están creando sus propias redes

2. Presencia de las bibliotecas en los sitios de las redes sociales

2.3 Las bibliotecas que participan en las redes o están creando sus propias redes

13.4

Matlab Real-Time Workshop

Matlab Real-Time Workshop was used in this thesis as a rapid prototyping tool. It gen- erates code from Simulink models, that runs on the control system. A new system target was created to allow some modifications to the way code are generated. This new system target was able to compile the code for AVR32, and make the code execute periodically. The system target can easily be installed, and are easy to use.

S-functions were developed for the different features of the I/O-card, and it gave Simulink blocks that was able to control the I/O. The S-functions that uses the normal user mode drivers worked as planned, and they were effective. A test concluded that a value sent through the I/O-card only was delayed with one time step. When using the threaded user mode driver, the results were a longer delay. This means that the threading is a less effective solutions. Optimizing the driver might help, but it’s more likely that the increased overhead of the threaded driver is bigger than the effectively gain of using threads.

Chapter 14

Conclusion

This thesis has developed the hardware and software necessary for using the AVR32 pro- cessor architecture as a control system. This resulted in a control system platform that can easily be installed and used. The platform it specially suited for applications where low weight and power consumption is important, because both the AVR32 itself and the microcontroller used in the I/O-card are low-power devices.

An I/O-card and drivers were developed and this enabled the AVR32 to measure and control its environment with digital and analog (0V − 5V ) signals. AVR32 communicates uses SPI to give commands to the I/O-card. This gave a reasonable fast and very reliable communication. Since SPI has no error checking, the communication protocol was designed with an effective error detection, even if the communication itself was reliable. This means that in the case of an unlikely error, the system will detect it.

The platform has be configured to use Matlab Real-Time Workshop as a rapid prototyping tool. This tool generates code from Matlab Simulink models, that makes it suited for designing and testing different controllers. With the developed S-functions, the I/O-card could be controlled with Real-Time Workshop. In this thesis standard Linux timers have been used to make the time steps periodical. This gives a minimum period of 1ms, but this haven’t been a problem since the control system aren’t fast enough to use lower periods. The platform has some performance limitation. The AVR32 processor isn’t a fast processor compared to a normal computer, and it lacks a FPU. This means that floating-point operations has to be software emulated and is less effective, which limits the ability to control complex systems. If a system is to complex, the risk of breaking any real-time constraints increases. However, the platform is well suited to control less complex systems, and the workload is logged, and can be used to detect if the system is close to breaking a real-time constraint.

The user manual was made to make it easy for users to install and use the control system platform. For users, the system will function as a black box where they don’t need to know how the system works, only that it can be controlled using Matlab Real-Time Workshop.

Chapter 15

Further Work

This thesis has built a control system platform that uses the AVR32 architecture, and further work would be to use this platform in a actual control system. The platform may also be developed further, to improve it by making it faster and more stable. Below is a list of ideas for further development.

◦ Find ways to make sending commands to the I/O-card more effectively. This can be done by making the AVR32 Linux SPI driver more efficient, drop error detection or reduce the overhead introduced by it or by optimizing the interaction between the User Mode driver and the device driver.

◦ Increase the number of I/O protocols that the I/O-card can use. The existing SPI communication protocol may be extended to for new commands.

◦ Improve the I/O protocols that are already present.

Appendix A

Digital appendix

The digital appendix includes the code and other files from the thesis, and have the following directories:

◦ code

Contains the code developed in the thesis. • atmega128

Firmware code for the ATmega128. • avr32

Code used by Matlab to make the AVR32 Real-Time target. Contain drivers and blocks in subdirectories.

• kernel module

Code for the device driver as a kernel module. ◦ eagle

Schematics and layout of the two AVR32 I/O-card versions in eagle format. ◦ file system

Files used in the AVR32 file system. ◦ linux

Patches, config files and other AVR32 Linux related files. ◦ report

The report and the user manual. Subdirectory contain graphics used in the report.

Schematics

Documento similar