WP3-24: Difference between revisions
Line 40: | Line 40: | ||
[[File:Prova01.png|400px|Figure 1. Intel Cyclone 10 LP floorplan.]] | [[File:Prova01.png|400px|Figure 1. Intel Cyclone 10 LP floorplan.]] | ||
Depending on the final implementation strategy, the resulting architecture could be an application specific processor, with the sole purpose of managing the calculations autonomously, in other words it could result in a finite state machine managing a small arithmetic unit. This would ensure minimal area usage and maximum efficiency, yet fully respecting the timing constraints as this kind of processor will have only one task at any time: | |||
1. Receive estimated state and reference input data. | |||
2. Perform calculations in a fixed, appropriate allowed time frame, as a sequence of internal operations opaque to the external interface. | |||
3. Provide control outputs to the actuators. | |||
4. Wait to start a new cycle (if, as desired, the calculation takes less than the allowed time frame, in other words it should have minimal input–output delay). | |||
Other advantages of such architecture are reliability, since the entire cycle is well known in advance and the processor has no unexpected behaviors, unless there are environmental factors outside of the designer’s control, in those cases redundancy schemes can be applied, even on the same FPGA: duplicating or triplicating the same design and determining the correct output by voting, a high level of reliability can be ensured, since the stabilization control of the UAV is a critical task. Taking up very few hardware resources, the rest of the device can be used for other purposes, such as sensor data elaboration, mission planning (through a general purpose soft–processor), path planning, image elaboration, obstacle detection and avoidance, which greatly benefit from a hardware implementation. Another possible approach, yet to be explored, to improve reliability is the use of parity bits to detect errors, in fact FPGAs almost always make use of memory blocks and embedded multiply–accumulate blocks with the required bit widths, the one considered here indeed provides 9 bits per word native memory (can be used in several different configurations, such as 18 or 16 bits per word) and 18 bits in – 36 bits out multipliers (can be also used as two separate, independent 9 bits in – 18 bits out multipliers). If the word is considered as a multiple of one byte, with 8 bits per byte, then one parity bit is available since the native word is 9 bits wide. Native bit widths are especially important and need to be kept in mind for a maximally efficient implementation. Single event upset at configuration time is now fully supported by several vendors. One more thing worth mentioning, made possible by FPGAs, is the update process while the controller is still functioning: having redundant units allows an in–place reconfiguration of one of them while the others ensure functionality, through partial reconfiguration. | |||
From the control point of view, this architecture choice allows to implement a supervisor to be used along with the controller, this supervisor could be a disturbance estimator, to correct and react to external unknown events (see the figures below). | |||
[[File:Prova02.png|400px|Figure 2. Complete controller general architecture.]] | |||
[[File:Prova05.png|400px|Figure 3. Detail of the position control architecture.]] | |||
==Contribution and Improvements== | ==Contribution and Improvements== | ||
The pipelined implementation technique, here proposed in the context of UAVs control (WP3-24), allows lower execution times, and hence smaller sampling times, than its naive implementation. Moreover, the power consumption of the pipelined control algorithm is lower. These two aspects constitute the main benefits of using a pipelining technique for the implementation of UAV control algorithm on an FPGA. In other words, the main aim behind the component (WP3-24) is to provide an implementation guideline for UAVs control algorithms showing that, when technological solutions such as FPGAs are used, the pipelining methodology can be successfully applied to obtain lower sampling periods, thereby allowing the implementation of more sophisticated controllers for UAVs. The efficiency of the proposed implementation methodology is shown by developing on FPGA a robust sampled—data controller for the autonomous navigation of drone which has been designed in the context of WP4 for C4D project. Finally, through experimental results, it can be shown that the pipelining methodology also allows taking into account the energetic aspects of the controller implementations, and not only the controller performance. This is another very important aspect for onboard systems as in UAVs. | The pipelined implementation technique, here proposed in the context of UAVs control (WP3-24), allows lower execution times, and hence smaller sampling times, than its naive implementation. Moreover, the power consumption of the pipelined control algorithm is lower. These two aspects constitute the main benefits of using a pipelining technique for the implementation of UAV control algorithm on an FPGA. In other words, the main aim behind the component (WP3-24) is to provide an implementation guideline for UAVs control algorithms showing that, when technological solutions such as FPGAs are used, the pipelining methodology can be successfully applied to obtain lower sampling periods, thereby allowing the implementation of more sophisticated controllers for UAVs. The efficiency of the proposed implementation methodology is shown by developing on FPGA a robust sampled—data controller for the autonomous navigation of drone which has been designed in the context of WP4 for C4D project. Finally, through experimental results, it can be shown that the pipelining methodology also allows taking into account the energetic aspects of the controller implementations, and not only the controller performance. This is another very important aspect for onboard systems as in UAVs. |
Revision as of 17:11, 12 November 2022
Efficient digital implementation of controllers on FPGAs
ID | WP3-24 |
Contributor | UNIVAQ |
Levels | Methodological |
Require | FPGAs for the implementation of the proposed control algorithms |
Provide | An efficient methodology for the implementation of digital control algorithms on FPGAs based on the pipeline approach. |
Input | Control algorithms for the autonomous navigation of drones to be implemented on FPGAs |
Output | Lower execution times, and hence smaller sampling times, than its naive implementation. Lower power consumption of the pipelined control algorithm. |
C4D building block | Flight Control. |
TRL | 3-4 |
Detailed Description
Efficient digital implementation of controllers on FPGAs. In the context of C4D project, the component WP3-24 aims to provide an efficient methodology for the digital implementation of controllers on FPGAs. It is well-known that the use of UAVs in many complex tasks has increased the complexity of the embedded control algorithms that are necessary in order to face more challenging performances, such as: detection and avoiding of obstacles; cooperation among drones; efficient trajectory execution; etc. However, many software solutions also present some limitations, due to its fixed internal architecture. This leads to a full serialization of the data treatment. The more complex is the control and decision algorithm, the longer is its execution time. This, in turn, constitutes a lower bound for the sampling time that can be used in the specific application. Clearly, longer sampling times determine worse controller performances. To obtain higher control performances, one can work in two possible directions. The first is methodological, and consists of designing the control algorithms on the basis of better discrete-time dynamic representations of the vehicle. The second is technological, and regards the use of more performing devices used to implement a given controller. As far as the technological solution is concerned, field-programmable gate arrays (FPGAs) can ensure better performances than software solutions, thanks to the possibility of parallelism and to the increasing integration density, which allows implementing complex control algorithms. In fact, FPGAs are full system-on-chip (SoC) solutions. They allow more flexibility for the implementation of embedded controllers, due to the fact that they include in the same chip various components (processors, memories, hardware multiplier blocks, analog–digital converters, matrix of programmable logic elements-fabric-and buses). The fact that FPGAs integrate both software and hardware resources allow faster implementations of controllers making use of the parallelism. Therefore, FPGAs constitute a valid hardware solution, since it is possible to design an architecture that is customized for the control algorithm to be implemented. This ensures shorter execution times of the algorithm. To further reduce the execution time in FPGAs, some techniques can be used that allow transforming the circuit structure, in order to reduce this time, and possibly the power consumption, maintaining the desired functionality, i.e., implementing the required control input. These (methodological, not technological) techniques include retiming/pipelining, folding/unfolding, interleaving, etc. The proposed methodology for the efficient implementation of controllers on FPGA is focused on retiming and pipelining. The former is a transformation technique used to change the locations of the delay elements in a circuit without affecting the input/output characteristics of the circuit. Pipelining is a special case of retiming used to reduce the critical path, introducing pipelining latches along the data path. Shortening the critical paths, one can increase the clock speed or the sample speed, or one can reduce the power consumption at the same speed.
In order to be functional, the resulting controller must respect certain constraints given by the specific application, in this case:
• Real–time execution represents a hard constraint, meaning that exceeding the allowed time for the control action calculation is unacceptable.
• Power consumption is significant because the final controller will be powered from the UAV’s battery.
• Size and weight are directly related to power consumption, but also to manoeuvrability if they are too high.
• Precision can be traded for better performances and power efficiency if kept inside acceptable bounds.
• Reliability must be always ensured, although different implementations can provide several ways to obtain it.
A perfect candidate for this application is the FPGA implementation, since it can provide strict real–time execution, high power efficiency, small size, and high reliability, at the cost of a reduced dynamic range. For instance, the Intel Cyclone 10 LP FPGA was available and corresponded to what was needed, then it has been used as a reference, it comes on a minimal board, useful for actual power consumption tests and fast prototyping, allowing installation on small UAVs for real world tests (see the figure below)
Depending on the final implementation strategy, the resulting architecture could be an application specific processor, with the sole purpose of managing the calculations autonomously, in other words it could result in a finite state machine managing a small arithmetic unit. This would ensure minimal area usage and maximum efficiency, yet fully respecting the timing constraints as this kind of processor will have only one task at any time:
1. Receive estimated state and reference input data.
2. Perform calculations in a fixed, appropriate allowed time frame, as a sequence of internal operations opaque to the external interface.
3. Provide control outputs to the actuators.
4. Wait to start a new cycle (if, as desired, the calculation takes less than the allowed time frame, in other words it should have minimal input–output delay).
Other advantages of such architecture are reliability, since the entire cycle is well known in advance and the processor has no unexpected behaviors, unless there are environmental factors outside of the designer’s control, in those cases redundancy schemes can be applied, even on the same FPGA: duplicating or triplicating the same design and determining the correct output by voting, a high level of reliability can be ensured, since the stabilization control of the UAV is a critical task. Taking up very few hardware resources, the rest of the device can be used for other purposes, such as sensor data elaboration, mission planning (through a general purpose soft–processor), path planning, image elaboration, obstacle detection and avoidance, which greatly benefit from a hardware implementation. Another possible approach, yet to be explored, to improve reliability is the use of parity bits to detect errors, in fact FPGAs almost always make use of memory blocks and embedded multiply–accumulate blocks with the required bit widths, the one considered here indeed provides 9 bits per word native memory (can be used in several different configurations, such as 18 or 16 bits per word) and 18 bits in – 36 bits out multipliers (can be also used as two separate, independent 9 bits in – 18 bits out multipliers). If the word is considered as a multiple of one byte, with 8 bits per byte, then one parity bit is available since the native word is 9 bits wide. Native bit widths are especially important and need to be kept in mind for a maximally efficient implementation. Single event upset at configuration time is now fully supported by several vendors. One more thing worth mentioning, made possible by FPGAs, is the update process while the controller is still functioning: having redundant units allows an in–place reconfiguration of one of them while the others ensure functionality, through partial reconfiguration. From the control point of view, this architecture choice allows to implement a supervisor to be used along with the controller, this supervisor could be a disturbance estimator, to correct and react to external unknown events (see the figures below).
Contribution and Improvements
The pipelined implementation technique, here proposed in the context of UAVs control (WP3-24), allows lower execution times, and hence smaller sampling times, than its naive implementation. Moreover, the power consumption of the pipelined control algorithm is lower. These two aspects constitute the main benefits of using a pipelining technique for the implementation of UAV control algorithm on an FPGA. In other words, the main aim behind the component (WP3-24) is to provide an implementation guideline for UAVs control algorithms showing that, when technological solutions such as FPGAs are used, the pipelining methodology can be successfully applied to obtain lower sampling periods, thereby allowing the implementation of more sophisticated controllers for UAVs. The efficiency of the proposed implementation methodology is shown by developing on FPGA a robust sampled—data controller for the autonomous navigation of drone which has been designed in the context of WP4 for C4D project. Finally, through experimental results, it can be shown that the pipelining methodology also allows taking into account the energetic aspects of the controller implementations, and not only the controller performance. This is another very important aspect for onboard systems as in UAVs.