盲源分离在维基百科的定义:指的是从多个观测到的混合信号中分析出没有观测的原始信号。通常观测到的混合信号来自多个传感器的输出,并且传感器的输出信号独立(线性不相关)。盲信号的“盲”字强调了两点:1)原始信号并不知道;2)对于信号混合的方法也不知道。最常用在的领域是在数字信号处理,且牵涉到对混合讯号的分析。盲信号分离最主要的目标就是将原始的信号还原出原始单一的讯号。一个经典的例子是鸡尾酒会效应,当许多人一起在同一个空间里说话的时候,听者可以专注于某一个人说的话上,人类的大脑可以即时处理这类的语音讯号分离问题,但是在数位语音处理里,这个问题还是一个困难的问题。

这里直接在MATLAB中跑仿真----这里是使用rPPG来通过面部视频来测量心率,请自行了解这一个课题。

ICA算法

一、数据

首先这里提供了一组数据

% 第一组数据
r0 = [165.40899854862118, 166.7253991291727, 166.85370101596516, 167.02641509433963, 166.99071117561684, 167.02525399129172, 167.05950653120465, 166.96719883889696, 166.89172714078376, 166.67489114658926, 166.62177068214805, 166.65602322206095, 166.62960812772133, 166.55616835994195, 166.4757619738752, 166.49288824383163, 166.50537010159653, 166.56516690856313, 166.44963715529752, 166.45602322206096, 166.64586357039187, 166.49259796806967, 166.27924528301887, 166.24615384615385, 166.07343976777938, 165.97968069666183, 165.91059506531204, 165.85050798258345, 165.74600870827285, 165.45166908563135, 165.37822931785195, 165.81915820029027, 166.2754716981132, 166.49143686502177, 166.43512336719883, 165.6478955007257, 165.32859216255443, 165.41393323657474, 165.40290275761973, 165.43715529753266, 165.44818577648766, 165.33671988388969, 165.3375907111756, 165.233381712627, 165.19622641509434, 165.19825834542814, 165.13730043541364, 165.22438316400581, 165.35587808417998, 165.2188679245283, 165.1822931785196, 165.2298984034833, 165.20957910014513, 165.24034833091437, 165.30827285921626, 165.41567489114658, 165.61132075471698, 165.98809869375907, 166.58577648766328, 166.88505079825833, 166.88388969521046, 166.83628447024674, 166.7010159651669, 166.69404934687952, 166.7088534107402, 166.70014513788098, 166.54716981132074, 166.57793904208998, 166.56052249637156, 166.45515239477504, 166.12772133526852, 165.7489114658926, 165.62409288824384, 165.5489114658926, 165.40725689404934, 165.4188679245283, 165.43396226415095, 165.29201741654572, 165.08737300435413, 165.0043541364296, 165.04499274310595, 165.11349782293178, 165.08853410740204, 165.1265602322206, 165.18577648766328, 165.1532656023222, 165.17939042089986, 165.11407837445574, 165.10653120464443, 165.11640058055153, 165.03715529753265, 164.90507982583455, 164.79245283018867, 164.73236574746008, 164.6989840348331, 164.79071117561685, 164.79796806966618, 164.87634252539914, 164.8876632801161, 164.76603773584907, 164.82380261248187, 164.81161103047896, 164.89956458635703, 164.96139332365746, 164.8656023222061, 164.82844702467344, 164.90246734397678, 164.78026124818578, 164.79187227866473, 164.7912917271408, 164.7410740203193, 164.5431059506531, 164.47982583454282, 164.43947750362844, 164.3756168359942, 164.28069666182873, 164.22583454281568, 164.17445573294629, 164.26066763425254, 164.388969521045, 164.51727140783746, 164.511175616836, 164.54078374455733, 164.3764876632801, 164.26502177068215, 164.35587808417998, 164.37358490566038, 164.43193033381712, 164.33178519593613, 164.26850507982584, 164.15471698113208, 164.02148040638608, 163.8632801161103, 163.7843251088534, 163.81103047895502, 163.82554426705371, 163.96371552975327, 163.91146589259796, 163.8487663280116, 163.9390420899855, 163.90159651669086, 163.8377358490566, 163.88476052249638, 164.08824383164006, 163.86763425253991, 163.81422351233672, 163.9256894049347, 164.06037735849057, 163.91552975326562, 163.88708272859216, 163.82235123367198, 163.6412191582003, 163.43047895500726, 163.3489114658926, 163.41190130624094, 163.28069666182873, 163.41857764876633, 163.3799709724238, 163.3343976777939, 163.34484760522497, 163.22815674891146, 163.19361393323658, 163.29259796806966, 163.29027576197387, 163.2621190130624, 163.23134978229317, 163.366618287373, 163.51582002902757, 163.5788098693759, 163.5532656023222, 163.44586357039188, 163.37039187227867, 163.22931785195937, 163.1811320754717, 163.1735849056604, 163.15965166908563, 163.07953555878083, 163.12394775036284, 163.21857764876634, 163.12714078374455, 163.2400580551524, 163.3410740203193, 163.28650217706823, 163.1854862119013, 163.43483309143687, 163.5146589259797, 163.4566037735849, 163.40812772133526, 163.3933236574746, 163.2388969521045, 163.42380261248186, 163.4267053701016, 163.35123367198838, 163.39013062409288, 163.43367198838897, 163.32481857764876, 163.488824383164, 163.46066763425253, 163.53468795355587, 163.6066763425254, 163.466473149492, 163.4612481857765, 163.34484760522497, 163.31843251088534, 163.27750362844702, 163.31843251088534, 163.32249637155297, 163.33265602322206, 163.43976777939042, 163.73584905660377, 164.1166908563135, 164.25166908563136, 164.07837445573296, 163.5323657474601, 163.3230769230769, 163.19622641509434, 163.03976777939042, 162.98838896952105, 163.12917271407838, 163.2635703918723, 163.29985486211902, 163.44296081277213, 163.3280116110305, 163.2577648766328, 163.24267053701016, 163.14542815674892, 163.2255442670537, 163.19854862119013, 163.16052249637156, 163.15645863570393, 163.22844702467344, 163.211030478955, 163.19187227866473, 163.33207547169812, 163.33062409288826, 163.18519593613934, 163.03396226415094, 162.8809869375907, 162.86066763425254, 162.89404934687954, 162.9433962264151, 162.87024673439768, 162.86879535558782, 162.81422351233672, 163.03425253991293, 163.03802612481857, 162.95587808417997, 162.95761973875182, 162.9457184325109, 162.93613933236574, 162.8020319303338, 162.81277213352686, 162.81364296081279, 162.88272859216255, 162.97155297532657, 163.0455732946299, 162.9799709724238, 162.87082728592162, 162.56023222060958, 162.68505079825835, 162.76023222060957, 162.74949201741654, 162.88301886792453, 162.89462989840348, 162.83715529753266, 162.8342525399129, 162.7991291727141, 162.78403483309143, 162.733236574746, 162.68388969521044, 162.69927431059506, 162.6789550072569, 162.78925979680696, 162.74658925979682, 162.76923076923077, 162.87489114658925, 162.87256894049347, 162.9811320754717, 162.8597968069666, 162.6644412191582, 162.53497822931786, 162.5724238026125, 162.59390420899854, 162.5657474600871, 162.59390420899854, 162.5190130624093, 162.56284470246734, 162.58171262699565, 162.53381712626995, 162.65486211901307, 162.5433962264151, 162.56052249637156, 162.5468795355588, 162.49172714078375, 162.53846153846155, 162.56255442670536, 162.64267053701016, 162.7187227866473, 162.68911465892597, 162.73933236574746, 162.5753265602322, 162.53497822931786, 162.62612481857764, 162.75703918722786, 162.6769230769231, 162.78403483309143, 162.94310595065312, 162.94078374455734, 163.011320754717, 162.99912917271408, 163.19970972423803, 163.16806966618287, 163.19970972423803, 163.155587808418, 163.24644412191583, 163.255442670537, 163.29637155297533, 163.3677793904209, 163.28156748911465, 163.32597968069666, 163.3245283018868, 163.0946298984035, 162.82583454281567, 162.83309143686503, 162.93933236574745, 163.04179970972424, 163.15355587808418, 163.19419448476052, 163.23134978229317, 163.12801161103047, 163.0644412191582, 163.04818577648766, 162.83715529753266, 162.80261248185778, 162.77910014513787, 162.77068214804063, 162.7587808417997, 162.78955007256894, 162.78722786647316, 162.733236574746, 162.7044992743106, 158.40957910014515, 158.4342525399129, 158.35587808417998, 158.3732946298984, 158.30420899854863, 158.24702467343977, 159.14833091436864, 159.0853410740203, 159.09695210449928, 159.1976777939042, 159.25631349782293, 159.3857764876633, 159.2957910014514, 159.3477503628447, 159.52714078374456, 159.5021770682148, 159.4452830188679, 159.4510885341074, 159.39796806966618, 159.14833091436864, 159.12075471698114, 158.98955007256893, 159.0545718432511, 159.12830188679246, 159.05195936139333, 157.78490566037735, 157.6978229317852, 157.73962264150944, 157.70188679245283, 158.47750362844704, 157.62612481857764, 157.73613933236575, 157.86734397677793, 157.7523947750363, 157.81190130624094, 157.73526850507983, 157.69085631349782, 157.69637155297534, 157.56168359941944, 157.63193033381714, 157.73149492017416, 157.866763425254, 157.79303338171263, 157.94775036284472, 157.80377358490566, 157.98345428156748, 158.19535558780842, 158.28650217706823, 158.23396226415093, 157.98258345428158, 157.94049346879535, 157.9465892597968, 157.8632801161103, 157.86850507982584, 157.86037735849055, 157.87982583454283, 157.87402031930333, 157.93294629898404, 157.94455732946298, 157.85079825834543, 157.8490566037736, 157.90304789550072, 157.75355587808417, 157.6844702467344, 157.72278664731496, 157.7457184325109, 157.88040638606677, 157.80319303338172, 157.71175616835995, 157.60928882438316, 157.57416545718434, 157.47082728592162, 157.56661828737302, 157.511175616836, 157.45892597968069, 157.31727140783744, 157.30188679245282, 157.52278664731494, 157.82409288824383, 157.94513788098695, 157.84267053701015, 158.06705370101596, 158.2746008708273, 158.5477503628447, 158.68737300435413, 161.86821480406385, 163.98693759071116, 164.19593613933236, 164.33265602322206, 163.93788098693759, 163.63076923076923, 163.32365747460088, 163.34310595065313, 163.27285921625545, 163.07489114658927, 162.94746008708273, 163.03047895500725, 163.12481857764877, 163.3764876632801, 163.611030478955, 163.49637155297532, 163.25166908563136, 162.97851959361392, 162.7912917271408, 162.86298984034832, 162.80841799709725, 162.87518142235123, 162.9277213352685, 162.91262699564587, 162.877793904209, 162.9065312046444, 162.5788098693759, 162.39187227866472, 162.32046444121914, 162.38635703918723, 162.6153846153846, 162.63918722786647, 162.79738751814224, 162.87576197387517, 162.9309143686502, 162.87605224963716, 159.30043541364296, 158.00261248185777, 157.91756168359942, 157.9132075471698, 157.85921625544267, 157.91872278664732, 157.9198838896952, 157.8455732946299, 157.7991291727141, 157.9021770682148, 157.84499274310596, 157.85283018867923, 157.67373004354135, 157.3523947750363, 157.4188679245283, 157.4568940493469, 157.39767779390422, 157.34165457184326, 157.4322206095791, 157.36197387518143, 157.28679245283018, 157.34397677793905, 157.5155297532656, 157.48040638606676, 157.42583454281566, 157.48040638606676, 157.62960812772133, 157.6798258345428, 157.78548621190131, 157.99187227866474, 158.12801161103047, 158.20058055152396, 158.22612481857766, 158.13091436865022, 157.91611030478956, 157.73294629898405, 157.57968069666182, 157.57300435413643, 157.5532656023222, 157.68708272859217, 157.70595065312045, 157.6377358490566, 157.544557329463, 157.55703918722787, 157.63860667634253, 157.66037735849056, 157.63715529753264, 157.6522496371553, 157.7198838896952, 157.7367198838897, 157.75007256894048, 157.80464441219158, 157.88795355587808, 157.9645863570392, 157.96168359941944, 157.83976777939043, 157.7378809869376, 157.61741654571844]
g0 = [133.8809869375907, 135.55965166908564, 135.71378809869375, 135.96487663280115, 136.03976777939042, 136.12278664731494, 136.30275761973874, 136.1788098693759, 136.00812772133526, 135.73846153846154, 135.54252539912918, 135.49753265602322, 135.46357039187228, 135.34165457184326, 135.2943396226415, 135.34804063860668, 135.29288824383164, 135.3056603773585, 135.28708272859217, 135.2589259796807, 135.4023222060958, 135.3288824383164, 135.23396226415093, 135.17590711175617, 135.06531204644412, 135.07605224963714, 134.99042089985485, 134.9164005805515, 134.78490566037735, 134.51291727140784, 134.33642960812773, 134.3910014513788, 134.5387518142235, 134.4955007256894, 134.60261248185776, 134.1288824383164, 133.97039187227867, 134.04731494920173, 134.17445573294629, 134.15965166908563, 134.18693759071118, 134.077793904209, 134.17735849056604, 134.15500725689404, 134.09550072568942, 134.15065312046445, 134.07982583454282, 134.15587808417996, 134.36923076923077, 134.21596516690857, 134.11727140783745, 134.0612481857765, 134.02960812772133, 133.99071117561684, 133.94600870827287, 134.0943396226415, 134.29608127721335, 134.55355587808418, 135.02409288824384, 135.30595065312048, 135.36284470246736, 135.31756168359942, 135.29521044992742, 135.3602322206096, 135.3701015965167, 135.34165457184326, 135.31930333817127, 135.3309143686502, 135.33933236574745, 135.26734397677794, 134.88940493468795, 134.35065312046444, 134.13817126269956, 134.20812772133527, 134.0179970972424, 134.05747460087082, 134.04179970972424, 133.900145137881, 133.70072568940495, 133.6476052249637, 133.71494920174166, 133.82960812772134, 133.84760522496373, 133.90827285921625, 133.97387518142236, 134.00725689404933, 134.03280116110304, 134.01161103047895, 134.14862119013063, 134.21915820029028, 134.0066763425254, 133.75616835994194, 133.58026124818576, 133.42699564586357, 133.4310595065312, 133.46182873730044, 133.4200290275762, 133.42612481857765, 133.4534107402032, 133.34746008708274, 133.34658925979681, 133.35849056603774, 133.5245283018868, 133.64905660377357, 133.61306240928883, 133.5674891146589, 133.6235123367199, 133.58403483309144, 133.6243831640058, 133.63105950653122, 133.5898403483309, 133.32568940493468, 133.1912917271408, 133.0801161103048, 132.9387518142235, 132.82148040638606, 132.6989840348331, 132.6267053701016, 132.64267053701016, 132.77126269956457, 132.8986937590711, 132.93149492017417, 132.91843251088534, 132.85399129172714, 132.82902757619738, 132.87866473149492, 132.91843251088534, 132.9645863570392, 132.9631349782293, 132.9422351233672, 132.7799709724238, 132.51146589259795, 132.2278664731495, 132.1735849056604, 132.09579100145137, 132.06734397677795, 132.100145137881, 132.07721335268505, 132.100145137881, 132.14281567489115, 132.06502177068214, 132.0786647314949, 132.09724238026124, 132.28156748911465, 132.1898403483309, 132.13584905660377, 132.2966618287373, 132.37735849056602, 132.3712626995646, 132.36574746008708, 132.32510885341074, 132.1010159651669, 131.7698113207547, 131.64267053701016, 131.56516690856313, 131.39622641509433, 131.46618287373005, 131.43628447024673, 131.33178519593613, 131.355297532656, 131.27402031930333, 131.28621190130625, 131.30072568940494, 131.30304789550073, 131.29375907111756, 131.33062409288826, 131.466763425254, 131.73178519593614, 131.82699564586358, 131.84702467343976, 131.81712626995645, 131.7698113207547, 131.59883889695212, 131.41857764876633, 131.26850507982584, 131.21509433962265, 131.1677793904209, 131.12278664731494, 131.18751814223512, 131.10420899854861, 131.14716981132077, 131.2955007256894, 131.27953555878085, 131.27373004354138, 131.4377358490566, 131.54136429608127, 131.50478955007256, 131.4432510885341, 131.46734397677793, 131.39970972423802, 131.54107402031931, 131.63076923076923, 131.61306240928883, 131.52917271407838, 131.466763425254, 131.32568940493468, 131.37387518142236, 131.31407837445573, 131.355587808418, 131.42351233671988, 131.38635703918723, 131.35036284470246, 131.30188679245282, 131.27837445573294, 131.1901306240929, 131.24296081277214, 131.3178519593614, 131.3788098693759, 131.52597968069665, 131.65602322206095, 131.87082728592162, 132.0179970972424, 132.0267053701016, 131.7091436865022, 131.47634252539913, 131.2542815674891, 131.06705370101596, 130.96226415094338, 131.06966618287373, 131.10943396226415, 131.12423802612483, 131.14194484760523, 131.16342525399128, 131.07982583454282, 131.06734397677795, 131.05137880986936, 131.1178519593614, 131.20725689404935, 131.1735849056604, 131.2043541364296, 131.32539912917272, 131.31523947750364, 131.3477503628447, 131.50362844702468, 131.53817126269956, 131.41364296081278, 131.19622641509434, 130.94136429608128, 130.86589259796807, 130.8833091436865, 130.81132075471697, 130.8145137880987, 130.7811320754717, 130.65079825834542, 130.81161103047896, 130.80725689404935, 130.85718432510885, 130.8177068214804, 130.86182873730044, 130.92394775036286, 130.81915820029027, 130.85834542815675, 130.87837445573294, 130.96052249637157, 131.07982583454282, 131.222351233672, 131.11349782293178, 130.95268505079827, 130.6354136429608, 130.65137880986939, 130.6412191582003, 130.65341074020319, 130.69579100145137, 130.72191582002904, 130.68940493468796, 130.6476052249637, 130.62409288824384, 130.65021770682148, 130.65283018867925, 130.76458635703918, 130.74687953555878, 130.7677793904209, 130.88853410740202, 130.93701015965166, 131.02060957910015, 131.09027576197388, 131.27808417997096, 131.31494920174165, 131.1076923076923, 130.86124818577647, 130.5654571843251, 130.5355587808418, 130.53294629898403, 130.52917271407838, 130.5300435413643, 130.44644412191582, 130.49840348330915, 130.4522496371553, 130.48417997097243, 130.5245283018868, 130.52917271407838, 130.5454281567489, 130.53788098693758, 130.59564586357038, 130.66850507982585, 130.7457184325109, 130.86298984034832, 130.9500725689405, 131.0612481857765, 131.08592162554427, 130.89782293178519, 130.79680696661828, 130.70972423802613, 130.68737300435413, 130.63134978229317, 130.69230769230768, 130.83512336719883, 130.79506531204643, 130.86037735849055, 130.89056603773585, 131.09753265602322, 131.07982583454282, 131.08388969521044, 131.15268505079825, 131.23396226415093, 131.2731494920174, 131.35791001451378, 131.38838896952103, 131.46502177068214, 131.4821480406386, 131.57822931785196, 131.34281567489114, 130.96284470246735, 130.8955007256894, 130.84528301886792, 130.9056603773585, 130.97039187227867, 130.99593613933237, 130.96487663280115, 130.99245283018868, 130.9387518142235, 130.89608127721334, 130.7277213352685, 130.74629898403484, 130.87082728592162, 130.82235123367198, 130.7991291727141, 130.88679245283018, 130.97387518142236, 131.01915820029026, 131.01015965166908, 127.311175616836, 127.41509433962264, 127.32191582002903, 127.1944847605225, 127.09956458635703, 126.93381712626996, 127.65631349782294, 127.60986937590711, 127.62612481857765, 127.69695210449927, 127.7300435413643, 127.755587808418, 127.79129172714079, 127.8809869375907, 127.97532656023222, 128.0078374455733, 127.98461538461538, 127.99622641509434, 127.90711175616836, 127.78722786647315, 127.73584905660377, 127.74629898403484, 127.77271407837445, 127.87721335268505, 127.74687953555878, 126.51059506531205, 126.33149492017417, 126.28272859216256, 126.1811320754717, 126.85544267053702, 126.14165457184325, 126.19883889695211, 126.17387518142235, 126.19680696661828, 126.1611030478955, 126.17561683599419, 126.18374455732946, 126.20522496371552, 126.22960812772133, 126.25631349782293, 126.43947750362845, 126.5933236574746, 126.55268505079826, 126.65544267053701, 126.70159651669086, 126.72568940493468, 126.70914368650217, 126.61857764876633, 126.42351233671988, 126.23657474600871, 126.23367198838896, 126.26879535558781, 126.19361393323658, 126.2055152394775, 126.20290275761974, 126.26589259796808, 126.28301886792453, 126.28185776487663, 126.2989840348331, 126.28911465892598, 126.33846153846154, 126.44325108853411, 126.31204644412192, 126.39825834542816, 126.52423802612482, 126.58142235123367, 126.78316400580552, 126.76255442670536, 126.60319303338171, 126.39970972423802, 126.22293178519594, 126.06618287373004, 126.0232220609579, 126.01973875181422, 125.94136429608128, 125.82757619738751, 125.78693759071118, 125.84441219158201, 126.15616835994194, 126.31088534107403, 126.35007256894049, 126.54804063860668, 126.80116110304789, 127.05950653120465, 127.21509433962264, 130.1367198838897, 132.13149492017416, 132.3288824383164, 132.5256894049347, 132.2365747460087, 131.81248185776488, 131.4711175616836, 131.41190130624094, 131.233381712627, 131.05921625544266, 130.97851959361392, 130.92743105950652, 130.92946298984035, 130.92017416545718, 131.04179970972424, 130.95703918722788, 130.89579100145139, 130.85602322206097, 130.79245283018867, 130.88824383164007, 130.90304789550072, 131.00957910014515, 131.01074020319302, 131.05486211901305, 131.08737300435413, 131.17184325108855, 130.81132075471697, 130.5300435413643, 130.45079825834543, 130.4357039187228, 130.53149492017417, 130.52830188679246, 130.6865021770682, 130.7364296081277, 130.82931785195936, 130.8020319303338, 127.56632801161103, 126.39854862119013, 126.36313497822931, 126.37851959361393, 126.39593613933236, 126.5056603773585, 126.47953555878084, 126.60696661828737, 126.5355587808418, 126.6589259796807, 126.69985486211901, 126.65747460087083, 126.48679245283019, 126.02119013062409, 125.93207547169811, 126.00812772133527, 125.89085631349782, 125.87489114658926, 125.88417997097243, 125.79216255442671, 125.7422351233672, 125.811030478955, 125.91494920174165, 125.95645863570392, 125.96197387518143, 126.07140783744558, 126.18635703918723, 126.30246734397677, 126.4188679245283, 126.71756168359941, 126.87431059506531, 126.97155297532656, 127.03367198838897, 126.9410740203193, 126.64034833091436, 126.3599419448476, 126.20203193033382, 126.05283018867925, 126.03309143686502, 126.08417997097243, 126.12481857764877, 126.05021770682148, 125.9822931785196, 125.96197387518143, 126.06124818577649, 126.07982583454282, 126.06240928882438, 126.22177068214805, 126.31233671988389, 126.35703918722787, 126.40377358490566, 126.49811320754716, 126.6133526850508, 126.80261248185776, 126.81683599419449, 126.70014513788098, 126.49230769230769, 126.31175616835995]
b0 = [118.88156748911466, 120.50914368650217, 120.59129172714078, 120.81857764876632, 120.78519593613933, 120.87663280116111, 120.88534107402032, 120.83802612481858, 120.75587808417997, 120.57939042089986, 120.46357039187228, 120.58606676342525, 120.5233671988389, 120.41915820029027, 120.31814223512336, 120.30391872278665, 120.3312046444122, 120.34368650217706, 120.25921625544267, 120.19506531204644, 120.32394775036285, 120.17619738751814, 120.07866473149492, 119.99912917271408, 119.81857764876632, 119.78432510885341, 119.7210449927431, 119.62380261248185, 119.46473149492017, 119.18142235123368, 119.15500725689405, 119.21044992743106, 119.27198838896952, 119.23483309143687, 119.35761973875181, 118.9944847605225, 118.85253991291727, 118.88534107402032, 119.00580551523947, 119.00928882438316, 118.9976777939042, 118.94310595065312, 118.90566037735849, 118.80406386066764, 118.79564586357039, 118.722206095791, 118.71611030478955, 118.73091436865022, 118.83134978229317, 118.71378809869375, 118.72307692307692, 118.73439767779391, 118.76023222060958, 118.79709724238026, 118.83483309143686, 118.88127721335269, 119.10072568940494, 119.36865021770681, 119.86182873730044, 120.0632801161103, 120.10159651669086, 120.05341074020319, 119.98809869375907, 120.02786647314949, 119.95645863570392, 120.05457184325108, 119.922206095791, 119.82844702467344, 119.76806966618287, 119.7123367198839, 119.41161103047895, 118.91930333817126, 118.93352685050799, 119.01857764876632, 118.88417997097243, 118.84963715529753, 118.76487663280116, 118.68272859216255, 118.53875181422352, 118.40493468795356, 118.46386066763425, 118.56865021770682, 118.55936139332366, 118.51698113207547, 118.58635703918723, 118.49724238026124, 118.51872278664732, 118.55471698113207, 118.57416545718432, 118.50972423802612, 118.3811320754717, 118.29143686502177, 118.24150943396226, 118.20174165457185, 118.17851959361393, 118.24179970972423, 118.13207547169812, 118.18258345428157, 118.28040638606676, 118.09695210449928, 118.09492017416545, 118.14978229317852, 118.13613933236574, 118.23541364296081, 118.18635703918723, 118.05979680696662, 118.15007256894049, 118.07256894049347, 118.09085631349782, 118.09927431059506, 118.04150943396226, 117.90246734397678, 117.82089985486212, 117.8023222060958, 117.766618287373, 117.62641509433962, 117.44934687953555, 117.40870827285922, 117.45573294629898, 117.55994194484761, 117.66124818577649, 117.71988388969521, 117.69085631349782, 117.53497822931786, 117.5033381712627, 117.55994194484761, 117.55036284470246, 117.59390420899855, 117.62467343976778, 117.39100145137881, 117.33962264150944, 117.21741654571844, 117.09375907111756, 116.98925979680696, 117.00203193033381, 116.94397677793904, 117.06792452830189, 116.97880986937591, 117.0200290275762, 117.00290275761974, 116.98171262699564, 116.90507982583455, 116.93439767779391, 117.07314949201742, 117.0055152394775, 116.8923076923077, 116.98809869375907, 116.98519593613933, 116.96748911465893, 116.87169811320754, 116.83164005805516, 116.63512336719884, 116.52423802612482, 116.4298984034833, 116.52772133526851, 116.37619738751815, 116.46937590711175, 116.44702467343977, 116.40493468795356, 116.38635703918723, 116.29840348330914, 116.28853410740203, 116.266763425254, 116.23105950653121, 116.19535558780842, 116.25979680696662, 116.39303338171263, 116.57213352685051, 116.5956458635704, 116.56865021770682, 116.47373004354137, 116.45166908563135, 116.35674891146589, 116.2699564586357, 116.2145137880987, 116.20928882438317, 116.14252539912917, 116.1721335268505, 116.22612481857765, 116.1622641509434, 116.20580551523948, 116.26357039187228, 116.32917271407837, 116.34194484760522, 116.37851959361393, 116.46328011611031, 116.45137880986938, 116.36719883889695, 116.388969521045, 116.29637155297533, 116.36603773584906, 116.37851959361393, 116.35587808417998, 116.38084179970973, 116.4211901306241, 116.41480406386067, 116.44499274310596, 116.42931785195937, 116.45863570391872, 116.45776487663281, 116.43396226415095, 116.41944847605225, 116.37097242380261, 116.26618287373005, 116.20580551523948, 116.22931785195937, 116.23367198838896, 116.26473149492017, 116.3355587808418, 116.40203193033382, 116.41973875181422, 116.55036284470246, 116.51756168359942, 116.28940493468795, 116.14281567489115, 116.05805515239477, 115.91117561683599, 115.90943396226415, 116.011030478955, 116.04267053701015, 116.08911465892598, 116.22380261248186, 116.12859216255443, 116.05079825834542, 116.07314949201742, 116.00406386066763, 116.04528301886792, 116.0966618287373, 115.95181422351234, 115.99071117561684, 116.0388969521045, 116.02060957910014, 115.97619738751814, 116.10101596516691, 116.14049346879536, 115.9732946298984, 115.85950653120464, 115.82089985486212, 115.78490566037736, 115.73265602322206, 115.6978229317852, 115.68592162554427, 115.60203193033382, 115.57242380261248, 115.7701015965167, 115.78026124818578, 115.74833091436865, 115.77271407837445, 115.70711175616836, 115.72568940493468, 115.6455732946299, 115.60261248185776, 115.62264150943396, 115.70595065312047, 115.71727140783744, 115.73991291727141, 115.70943396226416, 115.67924528301887, 115.49550072568941, 115.48969521044992, 115.51756168359942, 115.56545718432511, 115.60899854862119, 115.58955007256894, 115.63280116110305, 115.64412191582002, 115.60319303338171, 115.63018867924528, 115.59274310595065, 115.56632801161103, 115.51407837445574, 115.48156748911465, 115.49579100145138, 115.50914368650217, 115.5500725689405, 115.69201741654572, 115.6534107402032, 115.71959361393324, 115.61741654571843, 115.55297532656023, 115.38780841799709, 115.38548621190131, 115.3756168359942, 115.37735849056604, 115.40290275761974, 115.42380261248186, 115.4011611030479, 115.43628447024673, 115.45166908563135, 115.42902757619738, 115.33875181422351, 115.34078374455733, 115.25921625544267, 115.26531204644412, 115.30972423802612, 115.34804063860668, 115.4188679245283, 115.43134978229318, 115.48824383164006, 115.54600870827286, 115.41422351233672, 115.44179970972424, 115.51640058055152, 115.52772133526851, 115.53846153846153, 115.57387518142235, 115.63831640058055, 115.72597968069667, 115.71204644412191, 115.80493468795356, 115.81422351233672, 115.86502177068215, 115.84673439767779, 115.83947750362844, 115.82960812772133, 115.85718432510885, 115.87663280116111, 115.93875181422351, 115.9654571843251, 115.98026124818578, 115.92975326560233, 115.81915820029027, 115.67982583454281, 115.58955007256894, 115.6188679245283, 115.6899854862119, 115.80870827285922, 115.8078374455733, 115.78984034833091, 115.85863570391872, 115.72133526850509, 115.74746008708273, 115.57068214804063, 115.59187227866474, 115.67982583454281, 115.57068214804063, 115.51204644412192, 115.43018867924528, 115.51407837445574, 115.70159651669086, 115.6055152394775, 111.9622641509434, 112.0632801161103, 112.1489114658926, 112.1454281567489, 112.20377358490566, 112.13323657474601, 112.78925979680697, 112.811030478955, 112.77968069666183, 112.89404934687954, 112.92743105950653, 112.92133526850508, 113.0121915820029, 113.03164005805515, 113.04470246734398, 113.02931785195936, 113.07489114658927, 112.98461538461538, 112.77358490566037, 112.70188679245283, 112.555587808418, 112.54020319303338, 112.56226415094339, 112.522206095791, 112.488824383164, 111.48185776487664, 111.32104499274311, 111.3465892597968, 111.29550072568941, 111.98984034833092, 111.28853410740203, 111.28388969521045, 111.37590711175616, 111.37155297532657, 111.34949201741655, 111.27489114658925, 111.28388969521045, 111.27373004354136, 111.23425253991292, 111.2789550072569, 111.32133526850508, 111.42060957910014, 111.35703918722787, 111.39593613933236, 111.47576197387518, 111.47953555878084, 111.24586357039188, 111.17910014513788, 111.2255442670537, 111.21625544267054, 111.25602322206096, 111.36632801161103, 111.32162554426705, 111.28969521044992, 111.266763425254, 111.32133526850508, 111.35820029027576, 111.39941944847605, 111.30943396226415, 111.3076923076923, 111.28737300435414, 111.38055152394774, 111.17939042089985, 111.16052249637156, 111.19970972423802, 111.21915820029028, 111.30362844702468, 111.23512336719884, 111.15094339622641, 111.177648766328, 111.09985486211902, 111.01944847605225, 111.05195936139333, 110.95297532656024, 111.02264150943397, 110.81799709724238, 110.77590711175617, 110.94542815674892, 111.24876632801161, 111.27402031930333, 111.29201741654572, 111.4711175616836, 111.67750362844703, 111.84092888243832, 111.94629898403484, 114.74862119013062, 116.52801161103048, 116.71175616835994, 116.85544267053702, 116.59303338171263, 116.32104499274311, 116.1677793904209, 116.17242380261249, 116.02351233671989, 115.90798258345428, 115.85515239477503, 115.79593613933237, 115.70449927431059, 115.63454281567489, 115.62351233671988, 115.65747460087083, 115.6200290275762, 115.51233671988389, 115.38432510885342, 115.48940493468795, 115.4978229317852, 115.57706821480406, 115.57126269956458, 115.5956458635704, 115.55587808417997, 115.53381712626995, 115.40754716981132, 115.22496371552975, 115.23105950653121, 115.23541364296081, 115.32859216255443, 115.38490566037736, 115.56400580551524, 115.55210449927431, 115.65544267053701, 115.6911465892598, 112.55326560232221, 111.40464441219159, 111.36081277213353, 111.32685050798258, 111.28098693759071, 111.29869375907111, 111.30507982583454, 111.30478955007257, 111.24267053701016, 111.29201741654572, 111.3422351233672, 111.32452830188679, 111.21509433962264, 110.93062409288824, 110.9532656023222, 111.01364296081277, 110.92394775036284, 110.89201741654571, 110.97735849056603, 110.82641509433962, 110.82525399129173, 110.84208998548621, 110.9245283018868, 110.90798258345428, 110.87518142235123, 110.93381712626996, 111.0, 111.03164005805515, 111.15326560232221, 111.33701015965167, 111.4455732946299, 111.55297532656023, 111.59767779390421, 111.49753265602322, 111.33149492017417, 111.18867924528301, 111.06937590711176, 111.01625544267054, 111.00812772133527, 111.03831640058056, 111.0899854862119, 111.07924528301886, 111.03541364296082, 111.02844702467344, 111.05370101596516, 111.02728592162555, 111.03831640058056, 111.08882438316401, 111.0400580551524, 111.08156748911466, 111.11030478955007, 111.15791001451379, 111.2676342525399, 111.30420899854862, 111.3465892597968, 111.28417997097242, 111.15500725689405, 111.05428156748911]

这里就是一段视频(来自ios手机中处理)中,每一帧图像的RGB通道的平均值。

二、带通滤波器

此时我们将这组数据经过带通滤波器处理,然后组成矩阵,对该矩阵进行ICA处理,请自行下载FastICA

r1=ideal_passing(r0,0.5,5,fr);
g1=ideal_passing(g0,0.5,5,fr);
b1=ideal_passing(b0,0.5,5,fr);
x1=[r1;g1;b1];
y1=fastica(x1);

然后我们将ICA算法处理后的数据分别提取处理,由于ICA处理之后的数据我们并不知道哪些是源信号,以及哪些是干扰信号,所以只能经验看波形。

output1=y1(1,:);
output6=y1(2,:);
output7=y1(3,:);

三、画图

figure(1)
subplot(311);plot(r0);title('R通道原始数据')
subplot(312);plot(g0);title('G通道原始数据')
subplot(313);plot(b0);title('B通道原始数据')
figure(2)
subplot(311);plot(output1);title('第一组波形')
subplot(312);plot(output6);title('第二组波形')
subplot(313);plot(output7);title('第三组波形')

DUET盲源分离python duet盲源分离降噪算法_DUET盲源分离python


由此可以看到已经分离出来了比较好的波形,在第三组中,这是随机的。当然你也可以对源数据直接进行盲源分离处理,可以对比着看分析心率信号图。

PCA算法

同样对数据进行PCA算法处理

[COEFF,~,~,~]=pca(y);

pc1=COEFF(:,1);
f1=y*pc1;
outputpca1=f1';

figure(3)
subplot(311);plot(outputpca1);title('第一组波形')
subplot(312);plot(outputpca2);title('第二组波形')
subplot(313);plot(outputpca3);title('第三组波形')

DUET盲源分离python duet盲源分离降噪算法_DUET盲源分离python_02