| Z-Wave versus Zigbee - A Quick Intro to the Z-Wave Protocol Followed By A Biased Editorial | | Print | |
| Written by Akiba | |
| Saturday, 29 March 2008 | |
|
There's been more and more attention being focused on wireless home automation recently and the two biggest candidates for it is Zigbee and Z-Wave. Readers of this blog probably don't need much of an introduction to Zigbee because this blog is basically about it, or at least my adventures diving into Zigbee as I write my software. You're also probably aware that there has been a lot of mudslinging (ie: shit talking) between both camps, Zigbee and Z-Wave, as well as an ongoing flame war. So in an interest to educate myself on the real issues behind the talk, I decided to do some research and comparison between Z-Wave and Zigbee. I should note that a lot of the information was just pieced together via the internet since the Z-Wave specification is not public. A lot of the material in this post borrowed heavily from the information found in this article. Since there is not a lot of technical data publicly available for Z-Wave, I recommend perusing this article in Dr. Dobbs Journal since it's an excellent introduction. Z-Wave and the Z-Wave Alliance is a group that was established around the proprietary wireless networking protocol developed by a Danish company called Zensys. The Z-Wave protocol was designed to be a lightweight protocol for home automation that would be low cost yet still could support mesh networking. Lets begin with a look at the device types specified by Z-Wave... There are two types of devices: controllers and slaves. Controllers are the head honcho in the Z-Wave network. They are the only ones that can initiate transmissions, have a complete knowledge of the network, maintain the network, and control provisioning. There can only be one primary controller in the network and that one handles all of the provisioning and maintains the routing tables. All other controllers get their information from this controller. Controllers come in two different forms:
The protocol structure itself is similar to Zigbee in that it consists of four layers: PHY, MAC, Networking, and Application. PHY Layer MAC Layer A node is addressed by using two IDs: a home ID and a node ID. The home ID is like a PAN ID in 802.15.4 and the node ID is like a short address. The Home ID is 32-bits wide and is unique to the home, although multiple home IDs (ie: networks) can exist in the same home. The node ID is 8 bits wide. Both are assigned by the primary controller when it joins the node to the network. There are four types of frames in Z-Wave: Unicast, Multicast, Broadcast, and ACK. All frames use a similar structure, consisting of header, payload, and checksum. They are sent using a simple collision avoidance mechanism that just listens for traffic. If traffic is detected, then it will do a random backoff and try again. NWK Layer The routing table is maintained as a binary bitmap. This means that it is a table with all joined device IDs on the row and column header. If a device A is part of device B's neighbor list, then there will be a 1 in row A, column B. Otherwise it will be a zero. The good thing about a binary bitmap is that it is simple and also easily compressible. Thus it requires little RAM to hold the routing table. Even if the maximum table size of 232 x 232 nodes is reached, the routing table will be what's called a sparse matrix so various methods of compression can be used on it to make it small. In contrast, Zigbee requires a routing table entry for each routing node, which consists of the destination address (the entry just points to the first hop towards the destination), status of the route, and various other fields. There is almost no way to calculate how big your routing tables are going to be in Zigbee, since it's possible that each node in the network will require its own entry. At 65k max nodes, this is a bit daunting. To send the frame, the Z-Wave controller accesses its routing table and calculates a path from it to the destination. It then embeds this path into the frame and sends out the frame to the first hop in the path. The nodes then successively forward the frame based on the path embedded inside it. This method of routing is called source routing, as opposed to table-based routing methods such as AODV. APP Layer Application frames are embedded inside the Z-Wave frames and are decoded to send commands to the application layer. These frames carry information about the command class, the command, and the command parameters. There is also a special frame called the node information frame. It carries all the information about the node and is used for the node discovery process. Well, that about sums up my research on Z-Wave. So what are my conclusions regarding Z-Wave versus Zigbee?
Anyways, that's about it for me and my opinions. Let me know if there's a mistake in this post or if you think I'm full of sh*t.
Email This
Hits: 6971 Trackback(0)
Comments (1)
![]()
... written by Brant, May 12, 2009
Excellent commentary. The it's hard to find such concise and fruitful discussions. Thanks to Peter for his defense of Z-wave, it helps. I design homes that have complex lighting, media, environmental and security systems and advise my clients on contractors that do media integration/installation. Very helpful. Thanks.
report abuse
vote down
vote up
Votes: +2
Write comment
|
| Peter |
Z-Wave versus Zigbee - A Quick Intro to the Z-Wave Protocol Followed By A Biased Editorial
Jul 08 2008 20:32:22 This thread discusses the Content article: Z-Wave versus Zigbee - A Quick Intro to the Z-Wave Protocol Followed By A Biased Editorial
I have worked in embedded software development for many years and have been doing some work on these two protocols a while ago. The comment above is not really fair to Z-Wave. Instead of finding the weakpoints of Z-Wave it's far more important to find the strengths. One good advantage of Z-Wave is the fact it's driven by a centralized group managed by Zensys maintaining fairly strict compatibility between devices and with focus on SIMPLICITY. Measured on quantity of features Z-Wave is not matching Zigbee but the market segment of residential home automation see little motivation in a bloated protocol and expensive components. Too often protocols get bloated with needless features that might be something you can optionally choose. What happens when things are not mandatory and the group defining protocol requirements just include all member requests as options? The answer is usually that compatibility sucks and QA departments scream when they realize the complexity of testing various generations of products from various vendors with various options chosen. Protocols with many optional features are long-term nightmares in maintaining compatibility. Z-Wave is popular because it's simple and is doing exactly what it needs to do. Adding more features to Z-Wave will only insignificantly impact the usability of it as there are only so many ways you can control your light, aircondition, home security etc. So the point is...for Zigbee to succeed against Z-Wave it must have a very clean and simple mandatory base protocol profile that nobody violates. MINIMIZING options should be a primary goal for residential use because options lead to compatibility nightmares over time. As I often say in my profession...real men are the ones who can keep things simple by firmly saying "no" to all non-essential requirement requests. Zensys seem to have a better handle of this I believe. Am I wrong in that? |
#154 |
| Akiba |
Re:Z-Wave versus Zigbee - A Quick Intro to the Z-Wave Protocol Followed By A Biased Editorial
Jul 08 2008 23:00:02 Thanks for the comment on the post. You brought up many good points and I do think that Zigbee does suffer from complexity due to feature creep. Also Z-Wave does do a good job of keeping things simple for small networks, such as using source routing, limiting the maximum depth of the network and the number of router hops.
On the bad side, the Z-Wave spec is completely controlled by Zensys where they provide both the chips and the software. A closed environment prevents the diversity and competition that would occur in a more open environment where an industry standard radio and networking protocol could be used. On the hardware side, the 802.15.4 radio prices should fall faster than the Zensys radios. And the diversity of the 2nd and 3rd generation radios that are coming out now are much more sophisticated than the radios that were even available when I wrote that post. On the protocol side, the Zigbee spec is big and fairly bloated. I think everyone pretty much agrees on that. From a compliance point of view, the Alliance has tightened up the certification testing and the profile compliance for the 2007 specs. QUOTE: That quote is from the Zigbee Feature Set Profile documents for both Zigbee 2007 and the Zigbee 2007 Pro. So the Alliance is trying to address and improve the issues of maintaining interoperability. As for the feature set, it may be overkill for the Home Automation Profile as compared to Z-Wave and I do agree that Z-Wave does do home automation well. In fact, I think Z-Wave will have less competition from Zigbee in Home Automation than it will from the RF4CE group that has recently been formed. This group has the benefit of learning from the good and bad points of both Z-Wave and Zigbee and enjoys backing from some strong manufacturers. They also will be using 802.15.4 radios which will enjoy the same price curves as Zigbee, 6LoWPAN, ISA100, and Wireless Hart. On the plus side, Zigbee is moving ahead in creating interoperability profiles for a lot of applications, with the "Security and Safety", "Wireless Sensor Network", and other profiles coming up soon. So in the sense that the spec is bloated, I guess it depends on the application domain. If they were just targeting home automation or smart energy, then they could definitely lean up on a lot of things. But since the application domain is quite wide, then they are pretty much providing a framework of services and each profile will consume different parts of those services. Also, the spec is constantly pruning redundant or unused areas as can be seen from the original 2004 spec to the 2006 and now the 2007 versions. It would be nice if they informed the stack implementors about the changes too, though. |
#155 |
| Gilles |
Re:Z-Wave versus Zigbee - A Quick Intro to the Z-Wave Protocol Followed By A Biased Editorial
Jul 23 2008 15:01:59 I liked the editorial very much, thanks! I'm probably very biaised too since I'm involved in the ZigBee Alliance but I found it quite balanced.
The comment below regarding the simplicity of Z-Wave is quite fair and this is probably one of the downsides of ZigBee, at least the consequence of a willingness to address many different applications using the same protocol. Relying on a consortium of 250+ members is obviously much more difficult to manage and direct than driving alone a spec. That said, the main issues about ZigBee and Z-Wave are more strategic than technical. My company is a large OEM producing millions of devices that need sometimes to operate for 10 to 20 years (not consumer electronics). We need a global, worldwide standard, and we need multisourcing. Competition is key to boost innovation and decrease cost. That's the real nice thing about ZigBee. We have had experience with both ZigBee and Z-Wave. Although Z-Wave has a well designed stack, hardware is the real weak point. Zensys cannot be competitive (in terms of performance and cost) compared to the 802.15.4 players. Whether ZigBee will dominate or not the WSN space is still a question mark, but what is now sure is that 802.15.4 is the real reference driving the most promising standards (ZigBee, ISA100, WiHART, 6loWPAN). That was my one cent contribution. Congratulations for this site and good luck with the stack! |
#166 |
| Jordi |
Re:Z-Wave versus Zigbee - A Quick Intro to the Z-Wave Protocol Followed By A Biased Editorial
Aug 25 2008 20:09:17 I think that the price of the zensys ic is very expensive too.
The open standards create new oportunities and the world is adopting. |
#190 |
| < Prev | Next > |
|---|