5 research outputs found
Dynamic topology management unit for a fieldbus
Mestrado em Engenharia Electrónica e TelecomunicaçõesA redundância, mudança de topologia, detecção e isolamento de falhas pode
aumentar a fiabilidade de um barramento de campo, como o Controller Area
Network – CAN. A Dynamic Topology Management (DTM) em CAN faz uso da
redundância e da detecção e contenção de falhas. Esta solução possui duas
entidades fundamentais: a Unidade de Gestão de Topologia (Topology
Management Unit – TMU) e a Unidade de Comutação de Rede (Network
Switch Unit – NSU). A TMU é responsável pela gestão dos meios de
comunicação e pelo acesso de cada NSU a pelo menos um meio de
comunicação. A própria TMU possui redundância, havendo sempre uma TMU
master e pelo menos uma TMU slave num sistema DTM em CAN. Um dos
pontos fulcrais nesta rede é a necessidade da TMU Slave possuir os mesmos
dados que a TMU Master. Isto implica a existência de um método que garanta
a consistência de dados replicados. Quando ocorre um sincronismo dos dados
entre o slave e o master, o mecanismo de consistência de dados replicados
deverá ocupar os canais de comunicação o menos possÃvel.
Neste trabalho a arquitectura interna da TMU é analisada e é apresentada uma
proposta para uma implementação em FPGA. Vários problemas relacionados
com a gestão dos canais de comunicação são levantados e solucionados. O
principal tema desta dissertação é o estudo de um módulo interno da TMU que
executa um mecanismo de consistência de dados replicados. Um algoritmo de
pesquisa em árvore em conjunto com o cálculo de CRC de porções de
informação é utilizado para comparar dados entre o TMU master e slave. Esta
técnica demonstra a eficiência em termos de taxa de ocupação dos canais de
comunicação quando comparado com a técnica de reenvio de todos os dados.
A implementação em FPGA deste módulo, denominado Distributable Table
Content Consistency Checker – DT3C, demonstra a viabilidade da solução em
hardware. A simulação, em Matlab, do algoritmo de pesquisa em árvore
permite verificar as vantagens e limites.
ABSTRACT: The dependability of a fieldbus such as the Controller Area Network can be
improved by adapting redundancy, improving its topology, detecting and
isolating failures. The Dynamic Topology Management (DTM) in CAN is a
solution that makes extensive use of redundancy and also of failure detection
and isolation. This solution is composed by two main elements: The Topology
Management Unit – TMU and the Network Switch Unit – NSU. The TMU is
responsible for managing the redundant communication medium and
guaranteeing the access of each NSU to at least one communication medium.
There is also redundancy at the TMU level, which signifies that there is always
one TMU master and at least one TMU slave. One of the key points in this
network is the ability of the TMU slave to have the exact same data as the TMU
master. This implies that there must be a rigorous consistency scheme of
replicated data. Moreover, the consistency scheme should occupy as less as
possible the communication medium when a synchronization between the TMU
master and TMU slave is scheduled.
I analyze and propose a TMU internal architecture for FPGA based
implementation. Various issues related to the redundancy management of the
communication medium are analyzed. The main focus of this work is a simple
replicated data consistency mechanism module that is present inside the TMU.
A tree search algorithm combined with cyclic redundancy check calculations of
portions of data is used to compare data between the TMU slave and master.
This technique proves to be bandwidth efficient when compared to the option of
resending all the data from the TMU master to the slave.
The implementation in FPGA of this module, denominated Distributable Table
Content Consistency Checker - DT3C, demonstrates that the proposed solution
is achievable in hardware. Furthermore, a Matlab simulation of the tree search
algorithm reveals the efficiency and limitations of the DT3
Controller Area Network
Controller Area Network (CAN) is a popular and very well-known bus system, both in academia and in industry. CAN protocol was introduced in the mid eighties by Robert Bosch GmbH [7] and it was internationally standardized in 1993 as ISO 11898-1 [24]. It was initially designed to distributed automotive control systems, as a single digital bus to replace traditional point-to-point cables that were growing in complexity, weight and cost with the introduction of new electrical and electronic systems. Nowadays CAN is still used extensively in automotive applications, with an excess of 400 million CAN enabled microcontrollers manufactured each year [14].
The widespread and successful use of CAN in the automotive industry, the low cost asso- ciated with high volume production of controllers and CAN's inherent technical merit, have driven to CAN adoption in other application domains such as: industrial communications,
medical equipment, machine tool, robotics and in distributed embedded systems in general.
CAN provides two layers of the stack of the Open Systems Interconnection (OSI) reference model: the physical layer and the data link layer. Optionally, it could also provide an additional application layer, not included on the CAN standard. Notice that CAN physical layer was not dened in Bosch original specication, only the data link layer was dened. However, the CAN ISO specication lled this gap and the physical layer was then fully specied. CAN is a message-oriented transmission protocol, i.e., it denes message contents rather than nodes and node addresses. Every message has an associated message identier, which is unique within the whole network, dening both the content and the priority of the message. Transmission rates are dened up to 1 Mbps.
The large installed base of CAN nodes with low failure rates over almost two decades, led to the use of CAN in some critical applications such as Anti-locking Brake Systems (ABS) and Electronic Stability Program (ESP) in cars. In parallel with the wide dissemination of CAN in industry, the academia also devoted a large eort to CAN analysis and research, making CAN one of the must studied eldbuses. That is why a large number of books or book chapters describing CAN were published. The rst CAN book, written in French by D. Paret, was published in 1997 and presents the CAN basics [32]. More implementation oriented approaches, including CAN node implementation and application examples, can be found in Lorenz [28] and in Etschberger [16], while more compact descriptions of CAN can be found in [11] and in some chapters of [31].
Despite its success story, CAN application designers would be happier if CAN could be made faster, cover longer distances, be more deterministic and more dependable [34]. Over the years, several protocols based in CAN were presented, taking advantage of some CAN properties and trying to improve some known CAN drawbacks. This chapter, besides presenting an overview of CAN, describes also some other relevant higher level protocols based on CAN, such as CANopen [13], DeviceNet [6], FTT-CAN [1] and TTCAN [25]
Desenvolvimento de componentes para sistemas de segurança crÃtica
Mestrado em Engenharia Electrónica e TelecomunicaçõesHoje em dia é muito frequente a utilização de sistemas de controlo em
aplicações de segurança crÃtica, por exemplo nos aviões, automóveis, etc. Um
sistema de segurança crÃtica é assim designado porque em caso de falha pode
resultar em grandes prejuÃzos monetários ou, no pior cenário, em perdas de
vidas humanas. Este tipo de sistemas têm que ser robustos e tolerantes a
falhas para falhar o mÃnimo possÃvel e de uma forma segura. É também
necessário que estes sistemas atendam a requisitos temporais para garantir o
seu correcto funcionamento, sendo por isso designados de sistemas temporeal.
Quando tais sistemas são distribuÃdos, como em redes de sensores,
actuadores e controladores interligados por barramentos de campo, a
comunicação desempenha um papel importante no comportamento temporal.
Tem-se assistido nos últimos anos a um incremento da investigação e
desenvolvimento da área de sistemas de segurança crÃtica. Têm vindo a ser
criados alguns standards nesta área, sendo actualmente muito utilizado o CAN
– Controller Area Network. No DETI tem-se realizado muita investigação em
torno do CAN, tendo-se recentemente trabalhado em sistemas que permitem
introduzir redundância e maior largura de banda no barramento sem
modificação dos módulos a ele ligados. Os sistemas x-by-wire são um exemplo
de sistemas de segurança crÃtica utilizados nos automóveis onde a questão da
largura de banda é muito importante. Esta dissertação é uma continuação
desse trabalho, onde se pretende implementar na prática um sistema que
introduza estas caracterÃsticas a um barramento CAN.
As principais contribuições originais desta dissertação são o desenvolvimento
de alguns dos componentes projectados no trabalho de investigação em curso,
nomeadamente um gestor de topologia e um comutador. Estes componentes
permitem adicionar barramentos redundantes e gerir de uma forma dinâmica a
topologia numa rede CAN. Para tal foram utilizadas FPGAs – Field
Programmable Gate Arrays, um processador da Xilinx e algum hardware
desenvolvido no DETI, o CLAN e o respectivo controlador que permite a sua
interface com microprocessadores. A prototipagem em FPGAs facilitou e
simplificou a tarefa de simulação da lógica necessária à implementação, tanto
do gestor de topologia como do comutador.
ABSTRACT: Nowadays, the use of control systems in critical security applications is very
common, for instance in airplanes, automobiles, etc. It is called critical security
application because in case any fault occurs, it can cause huge monetary
damages or, in the worst scenario, it can cause the death of human lives. This
type of system must be strong and fault tolerant in order to fail the least as
possible and in a secure and safe way. It is also necessary that these systems
answer to time requirements so that they can guarantee their proper
performance, being therefore known as real-time systems. Whenever these
systems are distributed, as in sensor networks, activators and controllers
interconnected by fieldbuses, communication assumes an important role in
time behavior.
In the past few years we have been watching to an increase in the critical
security systems research and development area. Some standards have been
created in this field, being CAN - Controller Area Network one of the most used
in the present. In DETI, plenty of research has been made about CAN, and
recently important work has been done in systems that allow the introduction of
redundancy and greater bandwidth in the bus without modifying the modules
which are attached to it. The systems x-by-wire are just an example of critical
security systems which are used in cars, and where the matter of bandwidth is
actually very important. This dissertation is therefore a continuation of that work
that has been developed so far, which aims to implement, in practice, a system
that is able to introduce these features in a CAN bus.
The most original and more important contributions of this dissertation are the
development of some of the components projected in this work of ongoing
research, namely a topology manager and a commuter. These components
allow to attach redundant buses and to manage, in a dynamic kind of way, a
topology in a CAN network. In order to achieve it, there have been used FPGAs
– Field Programmable Gate Arrays, a processor from Xilinx and some
hardware which had been developed in DETI, CLAN and the corresponding
controller that allows its interface with microprocessors. The prototyping in
FPGAs has facilitated and simplified the task of simulating the logic that was
necessary to the implementation, whether from the topology manager whether
from the commuter
Flexible management of bandwidth and redundancy in fieldbuses
Doutoramento em Engenharia ElectrotécnicaOs sistemas distribuÃdos embarcados (Distributed Embedded Systems – DES) têm sido usados ao longo dos últimos anos em muitos domÃnios de aplicação, da robótica, ao controlo de processos industriais passando pela aviónica e pelas aplicações veiculares, esperando-se que esta tendência continue nos próximos anos.
A confiança no funcionamento é uma propriedade importante nestes domÃnios de aplicação, visto que os serviços têm de ser executados em tempo útil e de forma previsÃvel, caso contrário, podem ocorrer danos económicos ou a vida de seres humanos poderá ser posta em causa.
Na fase de projecto destes sistemas é impossÃvel prever todos os cenários de falhas devido ao não determinismo do ambiente envolvente, sendo necessária a inclusão de mecanismos de tolerância a falhas.
Adicionalmente, algumas destas aplicações requerem muita largura de banda, que também poderá ser usada para a evolução dos sistemas, adicionandolhes novas funcionalidades.
A flexibilidade de um sistema é uma propriedade importante, pois permite a sua adaptação às condições e requisitos envolventes, contribuindo também para a simplicidade de manutenção e reparação. Adicionalmente, nos sistemas
embarcados, a flexibilidade também é importante por potenciar uma melhor utilização dos, muitas vezes escassos, recursos existentes.
Uma forma evidente de aumentar a largura de banda e a tolerância a falhas dos sistemas embarcados distribuÃdos é a replicação dos barramentos do sistema. Algumas soluções existentes, quer comerciais quer académicas,
propõem a replicação dos barramentos para aumento da largura de banda ou para aumento da tolerância a falhas. No entanto e quase invariavelmente, o propósito é apenas um, sendo raras as soluções que disponibilizam uma maior
largura de banda e um aumento da tolerância a falhas. Um destes raros exemplos é o FlexRay, com a limitação de apenas ser permitido o uso de dois
barramentos.
Esta tese apresentada e discute uma proposta para usar a replicação de barramentos de uma forma flexÃvel com o objectivo duplo de aumentar a
largura de banda e a tolerância a falhas. A flexibilidade dos protocolos propostos também permite a gestão dinâmica da topologia da rede, sendo o número de barramentos apenas limitado pelo hardware/software.
As propostas desta tese foram validadas recorrendo ao barramento de campo
CAN – Controller Area Network, escolhido devido à sua grande implantação no mercado. Mais especificamente, as soluções propostas foram implementadas e validadas usando um paradigma que combina flexibilidade com comunicações event-triggered e time-triggered: o FTT – Flexible Time- Triggered. No entanto, uma generalização para CAN nativo é também apresentada e discutida.
A inclusão de mecanismos de replicação do barramento impõe a alteração dos antigos protocolos de replicação e substituição do nó mestre, bem como a definição de novos protocolos para esta finalidade. Este trabalho tira partido da
arquitectura centralizada e da replicação do nó mestre para suportar de forma eficiente e flexÃvel a replicação de barramentos. Em caso de ocorrência de uma falta num barramento (ou barramentos) que poderia provocar uma falha no sistema, os protocolos e componentes propostos nesta tese fazem com que o sistema reaja, mudando para um modo de funcionamento degradado. As
mensagens que estavam a ser transmitidas nos barramentos onde ocorreu a falta são reencaminhadas para os outros barramentos.
A replicação do nó mestre baseia-se numa estratégia lÃder-seguidores (leaderfollowers),
onde o lÃder (leader) controla todo o sistema enquanto os seguidores (followers) servem como nós de reserva. Se um erro ocorrer no nó
lÃder, um dos nós seguidores passará a controlar o sistema de uma forma transparente e mantendo as mesmas funcionalidades.
As propostas desta tese foram também generalizadas para CAN nativo, tendo sido para tal propostos dois componentes adicionais. É, desta forma possÃvel ter as mesmas capacidades de tolerância a falhas ao nÃvel dos barramentos
juntamente com a gestão dinâmica da topologia de rede.
Todas as propostas desta tese foram implementadas e avaliadas. Uma
implementação inicial, apenas com um barramento foi avaliada recorrendo a uma aplicação real, uma equipa de futebol robótico onde o protocolo FTT-CAN foi usado no controlo de movimento e da odometria.
A avaliação do sistema com múltiplos barramentos foi feita numa plataforma de teste em laboratório. Para tal foi desenvolvido um sistema de injecção de faltas que permite impor faltas nos barramentos e nos nós mestre, e um sistema de medida de atrasos destinado a medir o tempo de resposta após a ocorrência de uma falta.Distributed embedded systems (DES) have been widely used in the last few decades in several application domains, from robotics, industrial process control, avionics and automotive. In fact, it is expectable that this trend will continue in the next years.
In some of these application fields the dependability requirements are very important since the fail to provide services in a timely and predictable manner
may cause important economic losses or even put humans in risk.
In the design phase it is impossible to predict all the possible scenarios of faults, due to the non deterministic behaviour of the surrounding environment.
In that way, the fault tolerance mechanisms must be included in the distributed embedded system to prevent failures occurrence.
Also, many application domains require a high available bandwidth to perform the desired functions, or to turn possible the scaling with the addition of new features.
The flexibility of a system also plays an important role, since it improves the capability to adapt to the surrounding world, and to the simplicity of the repair
and maintenance. The flexibility improves the efficiency of all the system by providing a way to efficiently manage the available resources. This is very important in embedded systems due to the limited resources often available.
A natural way to improve the bandwidth and the fault tolerance in distributed systems is to use replicated buses. Commercial and academic solutions propose the use of replicated fieldbuses for a single purpose only, either to improve the fault tolerance or to improve the available bandwidth, being the first the most common. One illustrative exception is FlexRay where the bus replica
can be used to improve the bandwidth of the overall system, besides enabling redundant communications. However, only one bus replica can be used.
In this thesis, a flexible bus replication scheme to improve both the dependability and the throughput of fieldbuses is presented and studied. It can
be applied to any number of replicated buses, provided the required hardware support is available. The flexible use of the replicated buses can achieve an also flexible management of the network topology.
This claim has been validated using the Controller Area Network (CAN) fieldbus, which has been chosen because it is widely spread in millions of
systems. In fact, the proposed solution uses a paradigm that combines flexibility, time and event triggered communication, that is the Flexible Time-
Triggered over CAN network (FTT-CAN). However, a generalization to native CAN is also presented and studied.
The inclusion of bus replication in FTT-CAN imposes not only new mechanisms but also changes of the mechanisms associated with the master replication, which has been already studied in previous research work. In this work, these
mechanisms were combined and take advantage of the centralized architecture and of the redundant masters to support an efficient and flexible bus
replication.
When considering the system operation, if a fault in the bus (or buses) occurs, and the consequent error leads to a system failure, the system reacts,
switching to a degraded mode, where the message flows that were transmitted in the faulty bus (or buses) change to the non-faulty ones.
The central node replication uses a leader-follower strategy, where the leader controls the system while the followers serve as backups. If an error occurs in
the leader, a backup will take the system control maintaining the system with the same functionalities.
The system has been generalized for native CAN, using two additional components that provide the same fault tolerance capabilities at the bus level,
and also enable the dynamic management of the network topology.
All the referred proposals were implemented and assessed in the scope of this work. The single bus version of FTT-CAN was assessed using a real
application, a robotic soccer team, which has obtained excellent results in international competitions. There, the FTT-CAN based embedded system has been applied in the low level control, where, mainly it is responsible for the
motion control and odometry.
For the case of the multiple buses system, the assessment was performed in a laboratory test bed. For this, a fault injector was developed in order to impose faults in the buses and in the central nodes. To measure the time reaction of the system, a special hardware has been developed: a delay measurement system. It is able to measure delays between two important time marks for posterior offline analysis of the obtained values
Dynamic Topology Management in CAN
DETIThe controller area network (CAN) protocol was initially developed for the automotive industry to support low-level communication services between modules in distributed car control systems. Nowadays CAN is used in many other real-time applications, some of them requiring dependable behavior. When designing CAN based dependable systems the bus topology of CAN is a single point of failure that needs to be addressed either through bus replication or by adopting alternative topologies with better fault-tolerance capabilities, e.g., star topologies. This paper proposes a set of components, an architecture and protocols to enable the dynamic management of the topology of CAN networks made of several replicated buses, both to increase the total available bandwidth and to reconfigure the network upon bus permanent error. In many operational scenarios, the proposed solution could be plugged into existing systems to improve its resilience to bus permanent errors, without changing the code running in the nodes