{"id":278,"date":"2021-05-17T11:07:25","date_gmt":"2021-05-17T11:07:25","guid":{"rendered":"https:\/\/www.vu2ese.com\/?p=278"},"modified":"2021-05-17T15:05:28","modified_gmt":"2021-05-17T15:05:28","slug":"cascade-calculator","status":"publish","type":"post","link":"https:\/\/www.vu2ese.com\/index.php\/2021\/05\/17\/cascade-calculator\/","title":{"rendered":"Cascade Calculator"},"content":{"rendered":"<p>This calculator computes the intercept, noise figure and gain of cascaded stages of an RF circuit.<\/p>\n<p>It is based on the calculations set forth in Fig 2.69 of Experimental Methods in RF Design (Hayward, Campbell and Larkin, ARRL)<\/p>\n<p>This calculator was developed by Wes Hayward, W7ZOI, the lead author of the above book. He wrote the first version in the seventies and adapted to the PC for the EMRFD&#8217;s accompaying CD. My own implementation is independently developed from the descriptions in the above reference and from his other book Introduction to RF Design. <\/p>\n<p>Though these books are now out of print, they are available for online purchase and highly recommended source for the RF experimenter.  <\/p>\n<table>\n<tr>\n<td><\/td>\n<td>1<\/td>\n<td>2<\/td>\n<td>3<\/td>\n<td>4<\/td>\n<td>5<\/td>\n<td>6<\/td>\n<td>7<\/td>\n<td>8<\/td>\n<td>9<\/td>\n<td>10<\/td>\n<\/tr>\n<tr>\n<td>Function<\/td>\n<td><input type=\"text\" id=\"l0\" placeholder=\"---\" size=\"5\" value=\"PRE\" \/><\/td>\n<td><input type=\"text\" id=\"l0\" placeholder=\"---\" size=\"5\" value=\"RFA\" \/><\/td>\n<td><input type=\"text\" id=\"l0\" placeholder=\"---\" size=\"5\" value=\"BPF\" \/><\/td>\n<td><input type=\"text\" id=\"l0\" placeholder=\"---\" size=\"5\" value=\"MIX\" \/><\/td>\n<td><input type=\"text\" id=\"l0\" placeholder=\"---\" size=\"5\" value=\"POST\" \/><\/td>\n<td><input type=\"text\" id=\"l0\" placeholder=\"---\" size=\"5\" value=\"PAD\" \/><\/td>\n<td><input type=\"text\" id=\"l0\" placeholder=\"---\" size=\"5\" value=\"\" \/><\/td>\n<td><input type=\"text\" id=\"l0\" placeholder=\"---\" size=\"5\" value=\"\" \/><\/td>\n<td><input type=\"text\" id=\"l0\" placeholder=\"---\" size=\"5\" value=\"\" \/><\/td>\n<td><input type=\"text\" id=\"l0\" placeholder=\"---\" size=\"5\" value=\"\" \/><\/td>\n<tr>\n<td>Gain<\/td>\n<td><input type=\"text\" id=\"g0\" placeholder=\"Gaini(db)\" size=\"5\" value=\"-1\" \/><\/td>\n<td><input type=\"text\" id=\"g1\" placeholder=\"Gaini(db)\" size=\"5\" value=\"12\" \/><\/td>\n<td><input type=\"text\" id=\"g2\" placeholder=\"Gaini(db)\" size=\"5\" value=\"-2\" \/><\/td>\n<td><input type=\"text\" id=\"g3\" placeholder=\"Gaini(db)\" size=\"5\" value=\"-6\"  \/><\/td>\n<td><input type=\"text\" id=\"g4\" placeholder=\"Gaini(db)\" size=\"5\" value=\"18\" \/><\/td>\n<td><input type=\"text\" id=\"g5\" placeholder=\"Gaini(db)\" size=\"5\" value=\"-6\"\/><\/td>\n<td><input type=\"text\" id=\"g6\" placeholder=\"Gaini(db)\" size=\"5\" value=\"0\" \/><\/td>\n<td><input type=\"text\" id=\"g7\" placeholder=\"Gaini(db)\" size=\"5\" value=\"0\" \/><\/td>\n<td><input type=\"text\" id=\"g8\" placeholder=\"Gaini(db)\" size=\"5\" value=\"0\" \/><\/td>\n<td><input type=\"text\" id=\"g9\" placeholder=\"Gaini(db)\" size=\"5\" value=\"0\" \/><\/td>\n<\/tr>\n<tr>\n<td>Noise Figure<\/td>\n<td><input type=\"text\" id=\"n0\" placeholder=\"NF(db)\" size=\"5\" value=\"1\"\/><\/td>\n<td><input type=\"text\" id=\"n1\" placeholder=\"NF(db)\" size=\"5\" value=\"4\"\/><\/td>\n<td><input type=\"text\" id=\"n2\" placeholder=\"NF(db)\" size=\"5\" value=\"2\" \/><\/td>\n<td><input type=\"text\" id=\"n3\" placeholder=\"NF(db)\" size=\"5\" value=\"6\" \/><\/td>\n<td><input type=\"text\" id=\"n4\" placeholder=\"NF(db)\" size=\"5\" value=\"6\" \/><\/td>\n<td><input type=\"text\" id=\"n5\" placeholder=\"NF(db)\" size=\"5\" value=\"6\" \/><\/td>\n<td><input type=\"text\" id=\"n6\" placeholder=\"NF(db)\" size=\"5\" value=\"0\" \/><\/td>\n<td><input type=\"text\" id=\"n7\" placeholder=\"NF(db)\" size=\"5\" value=\"0\" \/><\/td>\n<td><input type=\"text\" id=\"n8\" placeholder=\"NF(db)\" size=\"5\" value=\"0\" \/><\/td>\n<td><input type=\"text\" id=\"n9\" placeholder=\"NF(db)\" size=\"5\" value=\"0\" \/><\/td>\n<\/tr>\n<tr>\n<td>OIP3, dbm<\/td>\n<td><input type=\"text\" id=\"i0\" placeholder=\"OIP3\" size=\"5\" value=\"50\"\/><\/td>\n<td><input type=\"text\" id=\"i1\" placeholder=\"OIP3\" size=\"5\" value=\"15\"\/><\/td>\n<td><input type=\"text\" id=\"i2\" placeholder=\"OIP3\" size=\"5\" value=\"200\"\/><\/td>\n<td><input type=\"text\" id=\"i3\" placeholder=\"OIP3\" size=\"5\" value=\"200\"\/><\/td>\n<td><input type=\"text\" id=\"i4\" placeholder=\"OIP3\" size=\"5\" value=\"19\"\/><\/td>\n<td><input type=\"text\" id=\"i5\" placeholder=\"OIP3\" size=\"5\" value=\"50\"\/><\/td>\n<td><input type=\"text\" id=\"i6\" placeholder=\"OIP3\" size=\"5\" value=\"200\"\/><\/td>\n<td><input type=\"text\" id=\"i7\" placeholder=\"OIP3\" size=\"5\" value=\"200\"\/><\/td>\n<td><input type=\"text\" id=\"i8\" placeholder=\"OIP3\" size=\"5\" value=\"200\"\/><\/td>\n<td><input type=\"text\" id=\"i9\" placeholder=\"OIP3\" size=\"5\" value=\"200\"\/><\/td>\n<\/tr>\n<\/table>\n<p>Bandwidth(Hz):<input type=\"text\" id=\"bandwidth\" placeholder=\"(Hz)\" value=\"500\"><br \/>\n<input type=\"submit\" value=\"Evaluate\" onclick=\"calculate();\"\/>\n<\/p>\n<p>Total Gain, dB <input type=\"text\" id=\"total_gain\" readonly value=\"\"\/><br \/>\nTotal Noise Figure, dB <input type=\"text\" id=\"total_noise_figure\" value=\"\" readonly\/><br \/>\nIIP3, dBm <input type=\"text\" id=\"iip3\" value=\"\" readonly \/><br \/>\nOIP3, dBm <input type=\"text\" id=\"oip3\" value=\"\" readonly \/><br \/>\nMDS, dBm <input type=\"text\" id=\"mds\" value=\"\" readonly \/><br \/>\nTwo-tone Dynamic Range, dB <input type=\"text\" id=\"dr\" value=\"\" readonly \/><br \/>\nReceiver Factor, dB <input type=\"text\" id=\"rfactor\" value=\"\" readonly .\/>\n<\/p>\n<p><script type=\"text\/javascript\">\n\/\/<![CDATA[\n\nfunction set(id, val){document.getElementById(id).value = val;};\nfunction get(id){return parseInt(document.getElementById(id).value);};\n\n\nfunction calculate(){\n\tvar total_gain = 0;\n\tvar inv_iip3 = 0;\n\tvar oip3 = [];\n\n\tfor (var i = 0; i < 10; i++){\n\t\ttotal_gain += get(\"g\" + i);  \/\/generate the id by adding 'g' to the i\n\t\toip3[i] = get(\"i\" + i) - total_gain; \/\/ total gain is gain upto this stage\n\t\t\/\/console.log(i + \":\" + oip3[i] + \"db, = \" + Math.pow(10, oip3[i]\/10));\n\t\toip3[i] = Math.pow(10, oip3[i]\/10);\n\t\tinv_iip3 += 1\/oip3[i]; \n\t}\n\tconsole.log(\"iip3\", 1\/inv_iip3);\n\tvar iip3 = 10 * Math.log10(1\/inv_iip3);\t\n\tset(\"total_gain\", total_gain);\n\tset(\"iip3\", iip3.toFixed(2));\n\tvar oip3= iip3 + total_gain\n\tset(\"oip3\", oip3.toFixed(2));\n\n\n\t\/\/ all the ratios for noise factor calculations\n\t\/\/ as power ratios, not in decibels\n\n\tconsole.log(\">>>>>> noise figure calculations\");\n\tvar f1 = Math.pow(10,get(\"n0\")\/10);\n\tvar g1 = Math.pow(10,get(\"g0\")\/10);\n\t\/\/we calculate the noise figure \n\tfor (var i = 1; i < 10; i++){\n\t\tvar f2 = Math.pow(10,get(\"n\" + i)\/10);\n\t\tvar n_term = (f2 -1)\/g1;\n\t\t\/\/console.log(i + \">f1=\" + f1 + \" f2=\" + f2 + \" gi1=\" + g1 + \" term=\" + n_term\n\t\t\/\/\t+ \" fn=\" + (f1 + n_term));\n\t\tf1 = f1 + n_term; \n\t\tconsole.log(i + \" \" + f1 + \", \" + Math.log10(f1) * 10);\n\t\tg1 = g1 * Math.pow(10, get(\"g\" + i)\/10);\n\t}\n\n\t\/\/convert to deciberls\n\tnf = Math.log10(f1) * 10;\n\tset(\"total_noise_figure\", nf.toFixed(2));\n\n\tvar mds = -174 + nf + Math.log10(get(\"bandwidth\")) * 10;\n\tset(\"mds\", mds.toFixed(2));\n\tvar dr = 2 * (iip3 - mds) \/ 3;\n\tset(\"dr\", dr.toFixed(2));\n\n\tvar rfactor = iip3 - nf;\n\tset(\"rfactor\", rfactor.toFixed(2));\n}\n\n\/\/]]>\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This calculator computes the intercept, noise figure and gain of cascaded stages of an RF circuit. It is based on the calculations set forth in Fig 2.69 of Experimental Methods in RF Design (Hayward, Campbell and Larkin, ARRL) This calculator was developed by Wes Hayward, W7ZOI, the lead author of the above book. He wrote [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-278","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.vu2ese.com\/index.php\/wp-json\/wp\/v2\/posts\/278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vu2ese.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vu2ese.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vu2ese.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vu2ese.com\/index.php\/wp-json\/wp\/v2\/comments?post=278"}],"version-history":[{"count":5,"href":"https:\/\/www.vu2ese.com\/index.php\/wp-json\/wp\/v2\/posts\/278\/revisions"}],"predecessor-version":[{"id":283,"href":"https:\/\/www.vu2ese.com\/index.php\/wp-json\/wp\/v2\/posts\/278\/revisions\/283"}],"wp:attachment":[{"href":"https:\/\/www.vu2ese.com\/index.php\/wp-json\/wp\/v2\/media?parent=278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vu2ese.com\/index.php\/wp-json\/wp\/v2\/categories?post=278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vu2ese.com\/index.php\/wp-json\/wp\/v2\/tags?post=278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}